moštenec.sk
 FAQFAQ    HľadaťHľadať    Zoznam užívateľovZoznam užívateľov    RegistráciaRegistrácia   NastaveniaNastavenia   PrihláseniePrihlásenie 

Load, not load; destroy object; simply move object, what is

 
Odoslať novú tému   Odpovedať na tému    moštenec.sk -> Dianie v Moštenci
Zobraziť predchádzajúcu tému :: Zobraziť nasledujúcu tému  
Autor Správa
Williamhawk



Bydlisko: Newyork

PríspevokZaslal: 30. Nov 2017 6:55    Predmet: Load, not load; destroy object; simply move object, what is Odpovedať s citátom

Hii...


If you have to deal with interacting objects like a med kit. When a player clicks on it, how do you deal with it being removed from the player's game play area? Do you destroy it or simply move it to a position far from the player area or do you simply set its mesh renderer and collider to an inactive state?

You can call destroy but we all know this creates garbage for the GC. I know of several designers who simply relocate the object position to say -1000 on the Y position. They also tend to load in all objects that are going to perform an action or are temporary to the scene when the scene loads up and use them as needed.


Thanks..!

For More Details:

commercial product animation
Zobrazit informácie o autorovi Odoslať súkromnú správu
Odoslať novú tému   Odpovedať na tému    moštenec.sk -> Dianie v Moštenci
Strana 1 z 1

 


Powered by phpBB © 2001, 2005 phpBB Group