Skip to content

unity does not call Awake on inactive GameObjects, a work-around for this.

Notifications You must be signed in to change notification settings

frekons/unity-inactive-awake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity InActiveAwake

Unity does not call Awake on inactive GameObjects, a work-around for this.

Usage

  • Add IInActiveAwake interface to your MonoBehaviour, implement your void InActiveAwake()
  • Drag and drop "Inactive Awake Caller" prefab to your scene (the scene that has the inactive GameObjects)
  • That's it, your InActiveAwake() function will be called if the GameObject is inactive while scene loading

There is a test scene and script for this, you can check TestScript.cs for a example

Note: You do NOT need a preLoadScene for that, I added it to test the result.

About

unity does not call Awake on inactive GameObjects, a work-around for this.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages