Search the Community
Showing results for tags 'property'.
-
Hi, In new editor I can't find the way to specify per instance parameters for properties and materials. In the .node file, these parameters were stored as follows: <node type="NodeLayer" id="1877567429" handled="0" name="layer_building_arrecife" property="cgs_building_arrecife"> <layer>guid://3d26f5abfa9536fdfda15d25830dcc1213be9dfb</layer> <property> <parameter name="floors">5</parameter> </property> <transform>1 0 0 0.0 0 1 0 0.0 0 0 1 0.0 0 0 0 1.0</transform> </node> Can you tell me how can I perform this operation in user interface? Thanks.
-
What title says. Sounds similar to this problem: Project attached.tmp.zip
-
I am having trouble with the fields in my C# component not showing up in the Node Properties section of the Parameters window. I have a PlayerJump component attached to an object of type ObjectMeshStatic with 2 fields which I want to be able to modify in-editor. One of them is a jump key, a key on the keyboard I want to use for jumping, and a jump force. using Unigine; [Component(PropertyGuid = "7f93b2a9029f5bf4d7fdd6c350ef8d4696b903ed")] public class PlayerJump : Component { [Parameter(Title = "Jump Key")] public Input.KEY jumpKey = Input.KEY.SPACE; [Parameter(Title = "Jump Force")] public float jumpForce = 10f; private BodyRigid rigidBody; private void Init() { rigidBody = node.ObjectBodyRigid; } private void Update() { if(Input.IsKeyDown(jumpKey) && rigidBody) { rigidBody.AddForce(vec3.UP * jumpForce); } } } Neither of them show up in the editor (demonstrated in the included GIF), even if I make them public or make them private and add the ShowInEditor attribute. The fields don't show up in my current project, a new clean project or even the C# Third Person Platformer demo. Is there perhaps a tick box I haven't ticked on somewhere or am I declaring the properties wrong or is there something else going on?
- 11 replies
-
- properties
- property
-
(and 1 more)
Tagged with:
-
When I create a child prop by inheriting node_base in editor, Do I need to use WordPad or Notepad to manually edit the prop file?
-
Properties node in property files not working with Editor2
Klimczak.Jan posted a topic in Bug Reports
Hi, I observed that properties (node properties with attribute version) not working with Editor2 for property file, eg.: <?xml version="1.0" encoding="utf-8"?> <properties version="0.01"> <property name="xyz" parent="node_base"/> </properties> This property will be not visible in Properties panel in Editor2.- 4 replies
-
- properties
- property
-
(and 1 more)
Tagged with:
-
I observed that custom properties attaches to nodes are not loaded when world is loaded via console (it is also used by Browser by Edit Content button which load level through launch_editor.bat) in Editor 2. It's looks like custom properties are not loaded before world is loaded. So in console you will see a message: Node::setProperty(): can't find "CUSTOM_NAME_XXX" property. Then if you save a world you will lose your custom properties on all nodes. As workaround you can just reload world and properties will be reattached. There is no problem if you not load world via console (e.g. world_load \"WORLD_NAME_XXX\"), just start Editor 2 and open level by file menu.
- 1 reply
-
- property
- properties
-
(and 1 more)
Tagged with:
-
Hi, I've created a file library_test.prop that I load in a test project in the init() function : engine.properties.addWorldLibrary("properties/library_test.prop"); Here is the file (library_test.prop) : <?xml version="1.0" encoding="utf-8"?> <properties version="1.00"> <property name="property_aaa"> <state name="type" type="switch" items="type1,type2">0</state> <state name="state1">0</state> <parameter name="param1" type="int" max="1000">233</parameter> <parameter name="param2" type="float" max="100">30</parameter> <parameter name="param3" type="string"/> </property> </properties> In the editor, in the property panel, I change for example a parameter value and I save the properties (with the floppy icon) : After that, i quit Unigine (without saving the world), when I reload my script, the property file has changed and I cannot get the parameters anymore in the editor because it seems like the previous save has changes the types of the parameters with "0" like that : <?xml version="1.0" encoding="utf-8"?> <properties version="1.00"> <property name="property_aaa"> <state name="type" type="switch" items="type1,type2">0</state> <state name="state1">0</state> <parameter name="param1" type="0" max="1000">544</parameter> <parameter name="param2" type="0" max="100">30</parameter> <parameter name="param3" type="0"/> </property> </properties> Is there a bug or have I made something wrong ? Thanks in advance, Philippe VAZ
-
[SOLVED] Error when a property is reassigned in Node Editor
ivan.cuevas posted a topic in Bug Reports
With latest Unigine version (2013-03-26) Reproduction Steps Create a Dummy node in editor Assign node_base property to the node. Disable Intersection parameter for that node property. Press Ok. Put focus on Property edit widget again and press enter. Open Assigned property editor, the property parameters are set to their original values (Intersection is checked again) If you don't change the property, there is no point to make a property reassignation removing all the custom parameter values for that node. Suggested solution In editor_nodes.h (ln 845) /* */ void property_pressed() { State s = new State(); if(property_el.getText() != "") { Property property = node.getProperty(); #ifdef OLD_WAY if(property == NULL) s.init_modify(nodes,node); else if(property.getName() != property_el.getText()) s.init_modify(nodes,node); node.setProperty(property_el.getText()); property = node.getProperty(); #else /* OLD_WAY */ if(property == NULL) { s.init_modify(nodes,node); } else if(property.getName() != property_el.getText()) { s.init_modify(nodes,node); node.setProperty(property_el.getText()); property = node.getProperty(); } #endif /* OLD_WAY */ if(property == NULL) { //... } else { //... } } else { //... } //... } For materials, it behaves in this way, you can customize surface material parameters, and if you try to assign the same material, nothing is done, respecting custom values. -
Hi, I would like my program creates a new "my_library.prop" file. I've found this list of functions https://developer.unigine.com/en/docs/1.0/code/scripting/library/engine/engine.properties I successfully created an empty "my_library.prop" file using engine.properties.addWorldLibrary() function. My question is how can I add a new property to this library? Should I use "engine.properties.cloneProperty()" function? Then, which property should I use to clone? I've tried "node_base" but cloneProperty returns an error "PropertyManager::cloneProperty(): can't clone "node_base" parent property". Thank you in advance for your help.
-
I am currently making use of the node import/export feature and applying a custom properties to my nodes. This seems to be a really powerful feature, but the lack of property parameter types such as vec3 mean I have to store 3 individual floats to store any custom vec3 data. Ideally I want my .prop files to be in the following format: <?xml version="1.0" encoding="utf-8"?> <properties version="1.00"> <property editable="1" name="fold"> <parameter name="offset" type="vec3">0.0 0.0 0.0</parameter> <parameter name="axis" type="vec3">0.0 0.0 0.0</parameter> <parameter name="angle" type="float">0.0</parameter> </property> </properties> I believe it would be of advantage to also include quat, vec4 and mat4 parameter types in a property too, even if they weren't intended to be editable through the editor as this may be more convenient for some.