• Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by trevordev

  1. Thanks! I created a PR with your code so hopefully it can get into version 3.2 See:
  2. I see, glad you have it working with your solution. Did you end up writing a method similar to the moveAllFromScene you described above or is it more manual juggling?
  3. Adding an AssetContainer.moveAllFromScene method sounds possible. Could you expand more on your exact use case? After you create your assets in code, how are you planning to use them? Is your code already written with multiple scenes? Beyond the vrHelper issue you mentioned, the assetContainer can also be used to load assets to be used at a later time without being automatically added to the scene. It does seem like the AssetContainer will result in code that has been written with multiple scenes to need to be rewritten to use a single scene and multiple AssetContainers which isn't very obvious. Having the helper method you suggested could be good for alleviating that pain. Switching assets between scenes is rather complex due to how tightly coupled each asset is to the scene when created. Adding support for that would likely be good but the change would be large and difficult to avoid breakage. Having special cases for certain objects like the vrHelper to move between scenes automatically might also cause confusion to users not expecting that behavior. If you create a github issue for the moveAllFromScene I can take a look at implementing it when free.
  4. Yea, your approach seems reasonable. Currently all manual asset creation adds the asset to the scene. Previously there was some discussion about possibly making AssetContainer and scene inherit from a same base interface so either could be passed into an asset creating method but this was not implemented due to the somewhat unnatural complexity of the change. Question: does the asset container has all of the asset array properties of the scene object Yes, it should contain all the asset arrays the scene has. For now I would recommend manually adding your assets to the AssetContainer and then calling removeAllFromScene like you mentioned. See this