Playmaker Forum
PlayMaker Feedback => Action Requests => Topic started by: jess84 on April 18, 2014, 02:53:07 PM
-
Would a custom action be possible, like Set Game Object but with the following two options;
Set Global Material:
Variable (dropdown list)
Material (drag material from assets window)
?
-
Not 100% sure what you want but from what you described? Try this?
http://pastebin.com/RbyUgEk1
Create a c# script and call it: SetGlobalMaterial
-
Thanks for that!
I'm testing now.
Firstly though, there's a conflict with an existing Action...
Assets/PlayMaker/Actions/SetMaterial.cs(9,22): error CS0101: The namespace `HutongGames.PlayMaker.Actions' already contains a definition for `SetMaterial'
(I've called yours SetGlobalMaterial)
-
I just renamed that problematic reference, and it's fine now.
The action works perfectly, and is exactly what I was after... thanks so much!!
This is a really useful one for doing A/B visual tests - such a time saver. I'd say this should probably be included in the official actions :)
-
Cool, glad its working for you.
-
One can also use the slightly more advanced "Set FSM Material" already included in the standard actions.
-
@Marsh This worked perfect for me thanks man! This should be added to the ecosystem.
-
Hi,
If it is ok with Mash i can place it on the Ecosystem