Feature Requests: Naming Object Instances & Exposing Instance Attributes

Discussion in 'Buildbox 3.0' started by jmp909, Feb 3, 2020.

  1. jmp909

    jmp909 Boxer

    Joined:
    Feb 2, 2020
    Messages:
    28
    Likes Received:
    4
    Hi,

    a couple of things I was trying to do that don't seem possible currently

    1) ability to rename instances on the scene of specific objects. Eg if i add 2 Rectangles they both just say "Rectangle" in the World list hierarchy. I should be able to call these "Rectangle1" and "Rectangle2" in the "Entity: Object" editor and I should be able to reference the object by this name in code.

    2) ability to expose script parameters (ie Instance Variables) to the "Entity: Object" view. At the moment I can only add attributes at the Asset level, which means I can't give different object instances different properties (like an "ID" attribute etc or a Color that I can pass to the asset instance (Object))

    3) automatically give each object unique a instance ID within the engine, which can be referenced & stored if necessary to identify a specific object in the code.. eg if I spawn an object with
    `let ent = this.scene().create('Obstacle1');` then something should be available like `ent.instanceID`

    thanks
     
    Last edited: Feb 3, 2020
  2. jmp909

    jmp909 Boxer

    Joined:
    Feb 2, 2020
    Messages:
    28
    Likes Received:
    4
    4) ability to set attribute value from code eg

    Code:
    rotationComponent = this.entity().component("Rotate");
    rotationSpeed = rotationComponent.attribute("Speed");
    rotationSpeed.z = 60;
    rotationComponent.SetAttribute("Speed", rotationSpeed);
    Code:
    let s = this.entity().component("Label");
    s.SetAttribute("Text", someValueFromInstance);
    
    etc
     
    Last edited: Feb 3, 2020
  3. jmp909

    jmp909 Boxer

    Joined:
    Feb 2, 2020
    Messages:
    28
    Likes Received:
    4
    sorry I found the "pin attribute" feature available for #2, so I'll remove that one!

    it's covered in this video if any body is looking
     

Share This Page