Update values in Inspector panel during Play?

Hello Cocos team! Longtime Unity user (UnityScript), learning Cocos to expand my toolset. I’m loving Cocos Creator and am working to refactor my brain to write actual JS. :grin:

My question is about the Properties Inspector panel. In Unity, property (variable) values update in real time in the Inspector. during play testing This is super helpful for keeping track of states changes and numerical values.

In CC though, the values never change. Bools, Ints, Position - everything keeps its value from before I press Play. I also noticed that setting nodes to active true/false state doesn’t actually show the correct state in the Node Tree (even destroyed nodes stay active in the Node Tree).

Is this by design, or am I doing something wrong?

Thanks!

You are right, we haven’t bind runtime properties / hierarchy with editor inspector and hierarchy.

I see this feature as a debug friendly feature, as we currently don’t run the game in editor, maybe a in browser debugger would be better ? What do you think ?

A browser debug window could work - but it could also get messy very quickly on larger projects with many exposed properties. The nice thing about the Unity Inspector panel is that you only see what you need to to see. If you are playtesting a scene you can click on any GameObject to see current Inspector values for that specific GameObject.

I don’t see how this same functionality could be replicated in a browser debug window without also recreating both the CC Node Tree and the CC Properties Panel in the browser. (Although that would be a great solution.)

There are also many times (for me sometimes hundreds of times per day) where I want to test if some code is working, but the result of that code might not be visible in gameplay (like increasing Int values or setting Bools.) My first few days with Cocos Creator I spent hours trying to figure out why my code wasn’t working, before I realized that it WAS working, but the Editor doesn’t show the changes. This is especially painful for new JS coders or people who have been using Unity for the last 6 years.

A workaround of course is to log everything to the console and monitor the changes there, but I’ve also discovered that calling “log” only works in Simulator mode, and causes errors in Browser mode. So every single log line has to be commented out before any testing or publishing can be done in the browser.

Thanks for the the explanation, I think it’s a valid need for users familiar with Unity.

Let’s loop @jare in the discussion, what do you think about it?

I totally agree with that we should provide some mechanism like “sandbox”.

In fact we have been ever implemented a real Game View like Unity in the predecessor of Creator (which is Fireball), but we discarded the idea in v0.5 because we want the editor be more extensible and light weight… that’s a long story…

Anyway, we will provide something like remote debugging, or embedded game window, both integrated with Creator. I think that would meet your needs.

Nice! I look forward to it! Thanks for the responses.

Would be a really nice feature. I really like it in Unity3D.