Maris Posted July 6, 2015 Share Posted July 6, 2015 Is it possible? Link to comment https://forums.kleientertainment.com/forums/topic/55921-addprefabpostinit-during-the-game/ Share on other sites More sharing options...
Kzisor Posted July 6, 2015 Share Posted July 6, 2015 @Maris, the entire point of PrefabPostInit is to change the variable/instance post initialization. Maybe I'm misunderstanding, but AddPrefabPostInit already does what you're wanting. Link to comment https://forums.kleientertainment.com/forums/topic/55921-addprefabpostinit-during-the-game/#findComment-652167 Share on other sites More sharing options...
DarkXero Posted July 6, 2015 Share Posted July 6, 2015 Prefabs register once. And that one time is when the postinit functions are loaded.So no, impossible, unless you manually reach the modfns table and input new functions there. But it's better to put variableslocal flag = falseAddPrefabPostInit("boards", function(inst) if flag then inst.param = "Hello" else inst.param = "World" endend)to adjust the postinit. Link to comment https://forums.kleientertainment.com/forums/topic/55921-addprefabpostinit-during-the-game/#findComment-652192 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now