Hello,
i have been working on my Post processing actions, which where working nice before this little update...
i replaced my first variables to get the PostProcessing Profile and Volume by an FSMOwner
The code is absolutely perfect and doesn't give error.
But when i enter the game, it returns me this error:
ArgumentException: GetComponent requires that the requested component 'PostProcessProfile' derives from MonoBehaviour or Component or is an interface.
UnityEngine.GameObject.GetComponent[PostProcessProfile] () (at C:/buildslave/unity/build/Runtime/Export/GameObject.bindings.cs:28)
HutongGames.PlayMaker.Actions.PostProcessingDepthOfField.SetDoF () (at Assets/PlayMaker/Actions/Post Processing/PostProcessingDepthOfField.cs:95)
HutongGames.PlayMaker.Actions.PostProcessingDepthOfField.OnEnter () (at Assets/PlayMaker/Actions/Post Processing/PostProcessingDepthOfField.cs:76)
HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:205)
HutongGames.PlayMaker.FsmState.OnEnter () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:175)
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2767)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2714)
HutongGames.PlayMaker.Fsm.UpdateStateChanges () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2642)
HutongGames.PlayMaker.Fsm.Start () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1925)
PlayMakerFSM.Start () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:548)
here is the parts of code for my action:
[ActionCategory("Post Processing Stack V2")]
[Tooltip("Modify Depth of Field during runtime.")]
public class PostProcessingDepthOfField : FsmStateAction
{
#region public variables
[RequiredField]
[ObjectType(typeof(PostProcessVolume))]
[Tooltip("Post Processing Profile to modify")]
public FsmOwnerDefault ObjectVolume;
[RequiredField]
[ObjectType(typeof(PostProcessProfile))]
[Tooltip("Post Processing Profile to modify")]
public FsmOwnerDefault ObjectProfile;
...
if(ObjectVolume !=null)
{
var go = Fsm.GetOwnerDefaultTarget(ObjectVolume);
var UsedVolume = go.GetComponent<PostProcessVolume>();
var UsedProfile = go.GetComponent<PostProcessProfile>();
UsedVolume.profile.TryGetSettings(out DofLayer);
so i tryed to replace FsmStateAction by Monobehaviour, and got some changes to make around void, and finally got stuck with another error message on the Fsm.GetOwnerDefaultTarget();
An object reference is required for the non-static field, method, or property 'Fsm.GetOwnerDefaultTarget(FsmOwnerDefault)'