Comments (5)
The problem with the current data property is that it only works on Phaser.Sprite objects, not Phaser.Group objects. Having a similar capability on groups would be very helpful.
from phasereditor2d-v3.
That's a feature that unity developers always ask and definitively we have to think on a solution for it. In Phaser there is the "data" property (Phaser.Sprite.data) that has that function of "custom properties". We already support it in the editor, you can edit the "data" and write its JSON value:
http://phasereditor.boniatillo.com/blog/quick-start/080-canvas#DataEditor
Sure, it is not so powerful as the Unity model and I am going to think about how to improve the editor in that field. To extract custom properties from JavaScript code could be difficult since there is many ways to do it, it is not like in C#, but we should find a way.
from phasereditor2d-v3.
the data
property is not available in groups in Phaser, however I think in the editor we can add it in near release.
from phasereditor2d-v3.
Thinking on this again.
from phasereditor2d-v3.
Hi @tomblind,
Done. Now you can define "public" properties in the prefab, and change the property value in the prefab instance.
Key differences with Unity:
-
The properties are declared visually, and code-generated by the scene compiler.
-
The properties do not affect the rendering of the object in the Scene Editor. We don't run user code inside the Scene Editor.
Here is the documentation: https://help.phasereditor2d.com/v3/scene-editor/prefab-user-properties.html
This is a video about it: https://www.youtube.com/watch?v=3ppowkkgz8Q
from phasereditor2d-v3.
Related Issues (20)
- Isometric depth sorting in editor
- v3.65.0 uploaded with a wrong release date in the title HOT 1
- Only Generate Methods no instance to Scene
- Collapsible tags in object tree
- Extending container not supported in editor HOT 6
- Set custom property to Phaser game object HOT 7
- Issue adding new prefab after deleting existing one (Windows) HOT 3
- Move assets from one asset pack to another HOT 1
- Add "protected" scope property option in object settings HOT 1
- Add support to compressed textures
- Preload Pack Files in Compiler Scene Settings doesn't work with webpack
- Deep collapse / expand with Alt modifier
- Ctrl + D to clone game object / script node as a sibling
- Add editor only gizmos
- Outline expanded state is lost on various actions HOT 3
- Pasting multiple script nodes changes their ordering HOT 2
- Display current pointer coordinates
- Cannot change property values of component HOT 6
- Copying & pasting a container should automatically rename the children objects
- Project template for making a discord game activity.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phasereditor2d-v3.