Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I am a new CC user and am still learning how it works. After a big investigation I could not find any informations about dynamica assets loading. From what I know every asset (node) must be added to the root scene node to be able to reach it and use it. So I can set it to invisible and now I can clone it for my future purposes. But what if I have hundreds nodes (models) in a game? Would it be perfect to load only models I want to use in a game on demand without adding them to the scene root at all? They must be prefabs of course I suppose. How do you handle it in your games? Thank you. |
||||
|
You can use the function ccbSwitchToCCBFile like in ccbSwitchToCCBFile("otherfile.ccb"); to switch to other ccb files, and split up your game like this. AFAIK, the javascript engine and coppercube variables and others stay intact durign switching. |
||||
|
Unfortunately this doesn't work as I expected: it removes all other objects from the scene. Definitely CC needs an action for dynamic loading selected prefab at runtime without removing any other. |
|