Jump to content

Prefab's Child Entity Scripts' Start Function Not Called


 Share

Recommended Posts

Based on this post by Phoenix88: http://www.leadwerks.com/werkspace/topic/15629-entitys-childs-start-function-does-not-get-called/#entry104340

 

and the previous closed bug report from Rick: http://www.leadwerks.com/werkspace/topic/11252-prefab-children-not-getting-scriptstart-called/page__hl__prefab+children

 

Prefabs that have child entity scripts are not calling their Start() functions when loaded via code. The scripts appear to be loaded since the Start() function can be called:

prefab = Prefab:Load("Prefabs/Pivot_crawler.pfb")

child = prefab:FindChild("Crawler")

child.script:Start()

 

Loading a prefab from Map:Load() works but not from Prefab:Load(). It's almost like the 'Prefab.NoStartCall' flag is hardcoded on the child entities.

 

Attaching example application that has a map that loads a prefab consisting of a pivot and a scripted crawler as its child and the exact same prefab next to it loaded via code.

PrefabChildTest.zip

  • Upvote 1

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...