Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Dynamically loaded assets

rozensoftware
Registered User
Quote
2017-09-12 10:28:27

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.


erik
Registered User
Quote
2017-09-12 17:12:38

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.


rozensoftware
Registered User
Quote
2017-09-13 10:48:42

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.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Interna?ional" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact