Monday, October 17, 2016

Unity object script call prodecure

Object 1 - script 1

Android media player - script 2

MainCamera - script 3

----->>>
media player: start()

camera script: start()

object 1 script: start()


----->>> to quit Unity Application,
call "Application.Quit();"

------>>>>

object 1 script:  OnApplicationQuit()

--- no camera scipt is called

media player:  OnApplicationQuit()

--->>> OnDestroy() is called later than OnApplicationQuit()

object 1 script: OnDestroy()

camera script: OnDestroy()

media player: OnDestroy()


==== start and destroy is reverse order ======

No comments:

Post a Comment