Let’s say I have a level with only a vehicle in it. I can call LoadLevelAdditive to bring in the vehicle, but instead I can call Instantiate to create my vehicle from a prefab.
Either way, I have my vehicle.
Which one is preferred? Why?
Let’s say I have a level with only a vehicle in it. I can call LoadLevelAdditive to bring in the vehicle, but instead I can call Instantiate to create my vehicle from a prefab.
Either way, I have my vehicle.
Which one is preferred? Why?
I would assume there’s some other stuff to LoadLevelAdditive in addition to just loading the GameObjects, so Instantiate should be faster. At least Instantiate is more versatile as you get the reference to the object and can set its position and rotation.
According to the reference, loadleveladditive is for loading extra levels meaning you load a new scene instead of a gameobject.
static function LoadLevelAdditive(index : int):void
static function LoadLevelAdditive(name : string):void
According to the Unity reference it takes in index and string and not gameobject.
And you are using it to load a tank? I am thinking you put a tank in an empty scene? Just to use load level additive. Not so simple huh? Load level additive is for you to load additional scenes into the current scene without destroying the current game objects. So in your case. Use Instantiate instead.