Api For Scenes

Discussion in 'Buildbox 3.0' started by PunkPuffin, Apr 30, 2019.

  1. PunkPuffin

    PunkPuffin Avid Boxer

    Joined:
    Sep 27, 2018
    Messages:
    285
    Likes Received:
    195
    There was a request for access to a Scene Name in the Scene API the other day, something I also would like very much.

    Since then I was thinking that perhaps the "Scene" in the API is not a match for a "Scene" in the Design views?

    What I'm wondering is if a "Scene" when running a game is made up of all the "Design Scenes" you can see.

    I've just run a very simple Start + 3 Scenes with the same object "Coin" in the 3 scenes. When I do a this.scene().find('Coin") it returns a list of coins matching what I can see in the preview when running the game, in my case 7 which is actually 7 scenes.

    So the Scene in the API is NOT a match for a Scene in the design. This might explain the lack of Name in the Scene API

    Can anyone else confirm what I'm thinking?
     
    particles likes this.
  2. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    @PunkPuffin Oh Man. That's too bad. Then we cannot set any runtime properties specific to objects in a scene.
    Then api name should be World not Scene.

    The only workaround I can suggest is getting Scene Name through Entity.
    let sceneName = this.entity().sceneName();

     
    Last edited: Apr 30, 2019
  3. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    @PunkPuffin , there is a method addLevel which treating every Scene in the editor as Level .
    this.scene().addLevel('Level 1');

    So requested Support to get Level Name from Entity.
    this.entity().levelName();
     
  4. PunkPuffin

    PunkPuffin Avid Boxer

    Joined:
    Sep 27, 2018
    Messages:
    285
    Likes Received:
    195
    @particles that could work. I assume it is the level the entity originally came from?

    Terrible name again. As I thought the idea in the designer is a 3D World is a Scene in the API and I thought for the player a 3D World was a Level. So confusing
     
  5. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    Yes. I am trying to find a solution with what they have right now.
     
  6. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    It should be just World and Scene in API.
     
  7. PunkPuffin

    PunkPuffin Avid Boxer

    Joined:
    Sep 27, 2018
    Messages:
    285
    Likes Received:
    195
    @particles Well I suspect we don't have much say here and probably too far down the development path to change it so we might just have to wait to see what we get now.
     
  8. particles

    particles Avid Boxer

    Joined:
    Aug 31, 2018
    Messages:
    337
    Likes Received:
    242
    Agree. Just want to get scene name but that is not possible at the moment. It's important in my project.
     

Share This Page