Playmaker Forum
PlayMaker Updates & Downloads => Share New Actions => Topic started by: jeanfabre on October 13, 2015, 07:29:12 AM
-
Hi,
For improved productivity, I duplicated CreateObject and added the possibility to name the created Object as well as parent it ( to the owner if wanted).
(https://pbs.twimg.com/media/CRMXnBcWoAAEJ2b.png)
You can get it on the Ecosystem (http://j.mp/1Esn1mF) or below:
CreateObjectAdvanced (https://github.com/jeanfabre/PlayMakerCustomActions_U3/blob/master/Assets/PlayMaker%20Custom%20Actions/GameObject/CreateObjectAdvanced.cs)
Bye,
Jean
-
Awesome improvement, thanks!
-
I will be a groupie and +1 this action.
;D
-
Hello,
This is a great action! I was wondering if I could make a small request if it's not too complicated.
Since we can parent the Gameobject to a parent, is it possible to set whether the Position and Rotation of the spawned object will be using the World Space or Local Space? I notice that it is only using the World Space at the moment.
-
Hi omgitstri.
The object is set to a parent 'after' positioning and rotating, so both would give the same result.
-
Hi,
no no, the request is good, indeed with UI, it changes the way the RectTransform is treated.
So basically now you have a WorldPositionStays bool, and when parenting it will either keep the new object in place or replace it relative to its parent.
Let me know if this works for you ( it's updated on the ecosystem)
Bye,
Jean
-
Hi.
indeed, i did not think about the UI.
-
Hello Jean,
I got the update on the action and I am getting this error when I try to instantiate an object.
NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.Actions.CreateObjectAdvanced.OnEnter () (at Assets/PlayMaker Custom Actions/GameObject/CreateObjectAdvanced.cs:95)
HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:199)
HutongGames.PlayMaker.FsmState.OnEnter () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:169)
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2670)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2628)
HutongGames.PlayMaker.Fsm.UpdateStateChanges () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2556)
HutongGames.PlayMaker.Fsm.Start () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1851)
PlayMakerFSM.Start () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:501)
Sorry for causing more trouble TT.TT
-
Hi,
Oups... please redownload from the ecosystem :) I fixed it.
Let me know how it goes.
Bye,
Jean
-
Was creating this type of action myself but I'd rather employ yours. To top it off, I was going to allow the user to set the game object active or not. A great use for pooling objects and cutting out naming, parenting, and setting to in/active. Think you can add a boolean to SetActive or not?
-
Hi,
yes good idea, it's in, please update from the Ecosystem.
Bye,
Jean