Jump to content

Component string value duplicates


reepblue
 Share

Go to solution Solved by Josh,

Recommended Posts

1. Create a json component file with these contents.

{
    "component":
    {
        "properties":
        [
            {
                "name": "filter",
                "label": "Filter",
                "value": ""
            },
            {
                "name": "size",
                "label": "Size",
                "value": [0.0, 0.0, 0.0]
            }
        ]
    }
}

2. Create an entity and attach the component script to it.

3. Change both values to anything.

4. Create a new entity, attach the same component.

You should see that "Size" is back to 0,0,0, but the "Filter" property got carried over from the first entity. 

  • Thanks 1

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

  • Solution

What was happening is the logic for retrieving string values from entities just wasn't in there, so string properties would just remain whatever their last value was.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...