playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - nickfourtimes

Pages: [1] 2
1
I'll answer my own post here (again).

I finally found this guide a few days ago. Basically, if you're working on an instance of a prefab in a scene, you can change the variables (or drag-and-drop object references) and then hit apply, and the changes should be reflected in the prefab on disk.

However, if you're changing the structure of the FSM – adding or removing actions or events, reordering states or actions, that sort of thing – then you really should be working on the prefab itself, on disk. Easiest way to do that is to hit "Select" either in the PM editor inspector, or in the Unity inspector itself... at that point you'll be working directly on the prefab. Of course, in this case, you can't now refer to objects in the scene, but that's a general Unity constraint anyway.

Once I read this article and started using "Select" to work directly in the prefabs, we no longer had this issue where our changes to the prefab instance weren't being applied.

2
I've updated to 1.9.0p14 and it seems like it's been fixed for now, we'll be testing it to be sure.

3
Well, I don't quite understand how this got fixed, but it did.

One thing I noticed is that in the PM editor, the State tab would show "Prefab Instance (modified)" no matter how many times I hit "Apply" (both in the PM window and in the Unity inspector). If my FSM changes weren't being applied, that would explain why the spawned prefabs were spawning with the wrong variables used.

The only things I recognise having done were:
- I had a "Description" in one of my states, which I removed.
- I had a "Finish FSM" action in the last of my init states, which had a few other actions in it. I moved the Finish FSM action to a separate state all on its own.

I made these latter changes, then when I hit Apply the PM window simply showed "Prefab Instance" instead of "Prefab Instance (modified)," and the prefab was spawned properly in the game.

4
I've got an FSM in a prefab. On spawn, there's an init state that spawns some other stuff with the prefab. The state uses Create Object, and stores the object in a variable called spawnedObj. Then it uses Set Parent to set the parent of spawnedObj to itself (nesting the new object with the spawned prefab).

However, at runtime, when the prefab is spawned, I can inspect the instantiated prefab and see that the selection of GameObject variables has changed. In this case, say the FSM has many GameObject variables: spawnedObj, other1Obj, other2Obj, ...

Instead of Set Parent setting the parent of spawnedObj, as it is in the prefab, the action is now setting the parent of other1Obj (that is, in the Set Parent -> GameObject drop-down list, it's showing other1Obj).

Why would this happen?

5
Heya, I have a UI component that links to the UI components around it:

Code: [Select]
using UnityEngine;

public class MyComp : MonoBehaviour {
    public MyComp up;
    public MyComp down;
    public MyComp left;
    public MyComp right;
}

In my FSM, I have an Object variable set to MyComp type. What I want to do is use GetProperty to get, say, the "up" MyComp.

However, when I use the GetProperty action, the Property drop-down doesn't show up, down, left, or right as accessible variables. Am I making wrong assumptions about the GetProperty action, or is something not set up correctly?

6
Oh right, forgot that. We're on 1.9.0.p7.

7
This is a bit of a specific bug.

I'm noticing that if there's a Next Frame Event action in an FSM, and the PlayMaker editor is open, then when you hit Play, you can no longer click in any numerical field in the Inspector to edit it.

For instance, in Play mode, you can't click in the Transform component to type in new x, y, or z values. However, you can still click on the "X" label and drag it around and make changes that way, but this lacks the precision of simply typing a value into the float field.

When you exit Play mode, you can then click and type new values as usual. In addition, if you're in Play mode and close the PlayMaker editor, or remove the Next Frame Event, you can click and type in the fields again.

This is in Unity 2018.2.20f1 (our artist notices it in 13f1 as well). I have an empty project (with PM installed and a test scene) which reproduces the problem (~22MB).

8
Playmaker Help / Re: Using FsmBoolField in a CustomActionEditor
« on: January 24, 2019, 01:57:24 PM »
Hm. So I've got an FsmBool wrapper:
Code: [Select]
using HutongGames.PlayMaker;

public class MyBool : FsmBool {
}

...and I've got an ObjectPropertyDrawer:
Code: [Select]
using HutongGames.PlayMakerEditor;
using UnityEditor;
using UnityEngine;

[ObjectPropertyDrawer(typeof(MyBool))]
public class MyBoolEditor : ObjectPropertyDrawer {

    public override Object OnGUI(GUIContent label, Object obj, bool isSceneObject, params object[] attributes) {
        GUILayout.BeginVertical();

        obj = EditorGUILayout.ObjectField(label, obj, typeof(MyBool), isSceneObject);

        GUILayout.Label("This is a custom object property drawer!");

        GUILayout.EndVertical();

        return obj;
    }

}

...and within one of my custom actions, I have a MyBool variable:
Code: [Select]
public MyBool someBool;

However, in the inspector for the custom action, all I see is "Some Bool" and an empty space, without the GUI label that I expected to be shown. Am I setting things up incorrectly? I couldn't find much documentation besides this, though the C# example there seems to be missing.

Thanks for your continued patience.

9
Playmaker Help / Re: Using FsmBoolField in a CustomActionEditor
« on: January 23, 2019, 09:30:44 AM »
Hm... that said though, I do want to be able to use the CustomActionEditor to like, show specific labels next to each FsmBool. So, for instance, instead of simply listing the FsmBools in the array as "Element 0," "Element 1," "Element 2," and so on, I could change the labels myself to read something like: "Event 0.52s," "Event 1.05s," "Event 6.92s" and so on.

10
Playmaker Help / Re: Using FsmBoolField in a CustomActionEditor
« on: January 23, 2019, 09:19:37 AM »
To be honest, in the meantime I think I'll just go with your suggestion of creating ten FsmBools off the bat and letting the designer fill them out as necessary, it just seems to be a much more reliable solution.

11
Playmaker Help / Re: Using FsmBoolField in a CustomActionEditor
« on: January 23, 2019, 09:17:06 AM »
This is my CustomAction (just a variant on SetAnimationTime, and I've omitted irrelevant code). Basically, if you give the action a particular AnimationClip, I want it to provide a number of FsmBools based on the number of AnimationEvents in the clip.

Code: [Select]
[ActionCategory(ActionCategory.Animation)]
    [Tooltip("Sets the current Time of an Animation, Normalize time means 0 (start) to 1 (end); useful if you don't care about the exact time. Check Every Frame to update the time continuously. This variant provides a boolean for each AnimationEvent in the animation.")]
    public class MySetAnimationTime : BaseAnimationAction {

        [RequiredField]
        [CheckForComponent(typeof(Animation))]
        public FsmGameObject animatingObject;

        [RequiredField]
        [ObjectType(typeof(AnimationClip))]
        [Tooltip("The animation clip to check for a tag.")]
        public FsmObject animationClip;

        public FsmFloat time;

        public FsmBool[] myBools;

        public bool normalized;
        public bool everyFrame;

        // for our drop-down stuff
        [HideInInspector]
        public int clipId;


        // ---------------------------------------------------------------------------------------- METHODS


        private void SetAnimationTime(GameObject go) {
            // same code as in SetAnimationTime
        }


        // ---------------------------------------------------------------------------------------- FSM METHODS

        public override void Reset() {
            animatingObject = null;
            animationClip = null;
            time = null;
            normalized = false;
            everyFrame = false;
            initialised = false;
            myBools= new FsmBool[0];

            return;
        }


        public override void OnEnter() {
            if(initialised) {
                // noop
            } else {
                Init();
            }

            SetAnimationTime(animatingObject.Value);

            if (!everyFrame) {
                Finish();
            }

            return;
        }


        public override void OnUpdate() {
            SetAnimationTime(animatingObject.Value);

            return;
        }
    }


And this is my CustomActionEditor:

Code: [Select]
[CustomActionEditor(typeof(MySetAnimationTime))]
public class MySetAnimationTimeEditor : CustomActionEditor {

    // -------------------------------------------------------------------------------------------- DATA MEMBERS
   
    // state
    GameObject prevObject;
    MySetAnimationTime mySetAnimTimeAction;


    // -------------------------------------------------------------------------------------------- METHODS

    void AnimationClipDropdown() {
        // code to choose an AnimationClip from the available clips on this Animation
    }


    void ShowMyBooleans() {
        var numbools = 0;

        // get a list of all the events/tags in the animClip
        if(null != mySetAnimTimeAction.animationClip && null != ((AnimationClip)mySetAnimTimeAction.animationClip.Value).events) {
            var animClip = (AnimationClip)mySetAnimTimeAction.animationClip.Value;
            numbools = animClip.events.Length;

            // create the array of booleans on the target
            if (0 < numbools && (null == mySetAnimTimeAction.myBools || 0 == mySetAnimTimeAction.myBools.Length)) {
                mySetAnimTimeAction.myBools = new HutongGames.PlayMaker.FsmBool[numbools];
                for (int i=0; i < numbools; ++i) {
                    mySetAnimTimeAction.myBools[i] = new HutongGames.PlayMaker.FsmBool();
                }
            }
        }

        // the label for all the snapping-point bools we're going to select from
        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("My Bools");
        EditorGUILayout.EndHorizontal();

        // show each of the FsmBools
        ++EditorGUI.indentLevel;
        for(int i=0; i < numbools; ++i) {
            EditorGUILayout.BeginHorizontal();

            if (null == mySetAnimTimeAction.Fsm) {
                Debug.LogWarning("no fsm");
            } else if (null == mySetAnimTimeAction.myBools[i]) {
                Debug.LogWarning("bad eleement " + i);
            } else {
                mySetAnimTimeAction.myBools[i] =
                    HutongGames.PlayMakerEditor.VariableEditor.FsmBoolField(new GUIContent("Event " + i), mySetAnimTimeAction.Fsm, mySetAnimTimeAction.myBools[i]);
            }
            EditorGUILayout.EndHorizontal();
        }
        --EditorGUI.indentLevel;

        return;
    }


    // -------------------------------------------------------------------------------------------- GUI METHODS

    public override bool OnGUI() {
        mySetAnimTimeAction = (MySetAnimationTime)target;

        EditField("animatingObject");

        AnimationClipDropdown();

        EditField("time");
        EditField("snappedThreshold");

        ShowMyBooleans();

        EditField("normalized");
        EditField("everyFrame");

        return GUI.changed;
    }
}

Probably making all sorts of mistakes here, but I couldn't find any other examples of this use case online.

12
Playmaker Help / Using FsmBoolField in a CustomActionEditor
« on: January 22, 2019, 02:22:33 PM »
Heya,

I've got an action, and it may require a variable number of FsmBools. In my CustomActionEditor, I'm doing the following:

Code: [Select]
public override bool OnGUI() {
    ...
    EditorGUILayout.BeginHorizontal();
    EditorGUILayout.LabelField("Bools");
    EditorGUILayout.EndHorizontal();

    // show an FsmBool for each required bool
    ++EditorGUI.indentLevel;
    for(int i=0; i < numbools; ++i) {
        EditorGUILayout.BeginHorizontal();

        if (null == baseAction.Fsm) {
            Debug.LogWarning("no fsm");
        } else if (null == baseAction.bools[i]) {
            Debug.LogWarning("bad element " + i);
        } else {
            baseAction.bools[i] =
                HutongGames.PlayMakerEditor.VariableEditor.FsmBoolField(new GUIContent("Bool " + i), baseAction.Fsm, baseAction.bools[i]);
        }
        EditorGUILayout.EndHorizontal();
    }
    --EditorGUI.indentLevel;
    ...
}

However, the assignment to baseAction.bools[ i ] doesn't seem to work. You can select an FSM variable in the drop-down list, but when you select it, the action doesn't seem to retain that boolean variable.

Am I using FsmBoolField() incorrectly?

13
Playmaker Bug Reporting / Re: Editor crash in 2018.3.2
« on: January 22, 2019, 09:34:25 AM »
Hm... I mean I guess it's hard to say, particularly since it happens often on one computer but very rarely on another. As I mentioned it seems to happen on entering or exiting Play mode, or on quitting the editor; possibly it's caused by prefab (de)serialisation.

I'll test a bit more; I know we had a similar spate of crashes when we would have the PM window open. In that case, I think it was a matter of changing our .NET runtime to v4, but we've tried all variants of that in 2018.3 and had no luck. I haven't extended PM that much; maybe about ten custom actions, and those tend to be copies of existing ones, while the corresponding editors are just copy-pasted code from other CustomAction editors.

I did create my own SetPropertyEditor for the basic SetProperty action. It's a bit of a quality-of-life extension: if we use SetProperty on another PlayMakerFSM object, the action itself will show the name of the other FSM (so we know which one it is if we're referencing an object with many FSMs on it); and if it's changing the property on a component, in a GameObject with multiple such components, it'll show the number of the component ("Nth out of M"), so we'll similarly know which component is being affected. Really don't know how this would cause the crash though.

14
Playmaker Bug Reporting / Editor crash in 2018.3.2
« on: January 21, 2019, 11:25:27 AM »
We're experiencing a very frustrating bug – it happens routinely on one computer, but only very rarely on another. What's more, the editor log seems to report a variety of different causes/locations for the crash, though it always seems to be one of three stack traces. It mostly happens when entering or exiting Play mode, but sometimes on quitting the editor as well... so, perhaps when assets/prefabs are being read & written.

Selections of the three types are below:

Type I – Garbage collection
Code: [Select]
(these mono_traverse lines are repeated about a hundred times)
0x00007FFEFD0ABC0A (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\unity-liveness.c:349] mono_traverse_array
0x00007FFEFD0ABFF7 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\unity-liveness.c:304] mono_traverse_objects
0x00007FFEFD0ABC0A (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\unity-liveness.c:349] mono_traverse_array
0x00007FFEFD0ABFF7 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\unity-liveness.c:304] mono_traverse_objects
0x00007FFEFD0ABBC0 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\unity-liveness.c:337] mono_traverse_array
0x00007FFEFD0ABFF7 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\unity-liveness.c:304] mono_traverse_objects
0x00007FFEFD0ABBC0 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\unity-liveness.c:337] mono_traverse_array
0x00007FFEFD0ABFF7 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\unity-liveness.c:304] mono_traverse_objects
0x00007FFEFD0ABBC0 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\unity-liveness.c:337] mono_traverse_array
0x00007FFEFD0AC6BA (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\unity-liveness.c:451] mono_unity_liveness_calculation_from_statics
0x00000001408F9639 (Unity) GarbageCollectSharedAssets
0x00000001409A785C (Unity) UnloadUnusedAssetsOperation::IntegrateMainThread
0x00000001409AAECF (Unity) PreloadManager::UpdatePreloadingSingleStep
0x00000001409AB7AA (Unity) PreloadManager::WaitForAllAsyncOperationsToComplete
0x0000000140E6AB6C (Unity) EditorSceneManager::RestoreSceneBackups
0x0000000141329E68 (Unity) PlayerLoopController::ExitPlayMode
0x0000000141335BDA (Unity) PlayerLoopController::SetIsPlaying
0x0000000141338AB2 (Unity) Application::TickTimer
0x0000000141494E2B (Unity) MainMessageLoop
0x0000000141496AC6 (Unity) WinMain
0x0000000142479C5A (Unity) __scrt_common_main_seh
0x00007FFF5B523034 (KERNEL32) BaseThreadInitThunk
0x00007FFF5D793691 (ntdll) RtlUserThreadStart

Type II – AnimationState destructor
Code: [Select]
========== OUTPUTTING STACK TRACE ==================

0x0000000141892449 (Unity) AnimationState::~AnimationState
0x000000014187FA22 (Unity) Animation::ReleaseAnimationStates
0x000000014187E8D2 (Unity) Animation::MainThreadCleanup
0x00000001405AC5A7 (Unity) delete_object_internal_step1
0x00000001408E0765 (Unity) CommitBatchDelete
0x00000001408F839C (Unity) DestroyObjectHighLevel_Internal
0x00000001408F8150 (Unity) DestroyObjectHighLevel
0x000000014097D534 (Unity) DestroyWorldObjects
0x0000000140E6A716 (Unity) EditorSceneManager::RestoreSceneBackups
0x0000000141329BAA (Unity) PlayerLoopController::EnterPlayMode
0x0000000141335BD3 (Unity) PlayerLoopController::SetIsPlaying
0x0000000141338AB2 (Unity) Application::TickTimer
0x0000000141494E2B (Unity) MainMessageLoop
0x0000000141496AC6 (Unity) WinMain
0x0000000142479C5A (Unity) __scrt_common_main_seh
0x00007FFF5B523034 (KERNEL32) BaseThreadInitThunk
0x00007FFF5D793691 (ntdll) RtlUserThreadStart

Type III – GetType
Code: [Select]
========== OUTPUTTING STACK TRACE ==================

0x00007FFEFCFF6751 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\icall.c:5598] ves_icall_System_Reflection_Assembly_GetTypes
0x00000000538B1586 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
0x00000000538B133F (Mono JIT Code) System.Reflection.Assembly:GetTypes ()
0x000000003A646F22 (Mono JIT Code) [C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ReflectionUtils.cs:91] HutongGames.PlayMaker.ReflectionUtils:GetGlobalType (string)
0x0000000000742663 (Mono JIT Code) [C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:661] HutongGames.PlayMaker.ActionData:GetActionType (string)
0x0000000000740A6B (Mono JIT Code) [C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:826] HutongGames.PlayMaker.ActionData:CreateAction (HutongGames.PlayMaker.ActionData/Context,int)
0x0000000000740283 (Mono JIT Code) [C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:776] HutongGames.PlayMaker.ActionData:LoadActions (HutongGames.PlayMaker.FsmState)
0x000000003A6EFE4B (Mono JIT Code) [C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\FsmState.cs:123] HutongGames.PlayMaker.FsmState:LoadActions ()
0x000000000073AFBB (Mono JIT Code) [C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\Fsm.cs:1750] HutongGames.PlayMaker.Fsm:InitData ()
0x000000005365D473 (Mono JIT Code) [C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\PlayMakerFSM.cs:891] PlayMakerFSM:OnAfterDeserialize ()
0x00000000535F3798 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007FFEFD0BBE4B (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFEFD041E32 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:2919] do_runtime_invoke
0x00007FFEFD04AE3F (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:2966] mono_runtime_invoke
0x0000000140C007BA (Unity) scripting_method_invoke
0x0000000140BF0D8A (Unity) ScriptingInvocation::Invoke
0x0000000140C08C57 (Unity) InvokeMethod<RemapPPtrTransfer>
0x0000000140BB339F (Unity) TransferScriptingObject<RemapPPtrTransfer>
0x0000000140BB14A0 (Unity) SerializableManagedRefTransfer::Transfer<SerializableManagedRefBackupGenerator>
0x0000000140E26C59 (Unity) CopyProperties
0x0000000140E24C4E (Unity) CloneObjectsForPrefabSave
0x0000000140E24344 (Unity) CloneObjectsForPrefabSave
0x0000000140E2F05F (Unity) SavePrefab
0x0000000141F07D68 (Unity) AssetDatabaseV1::WriteSerializedAsset
0x0000000141F07F5C (Unity) AssetDatabaseV1::WriteSerializedAssets
0x0000000141EB732F (Unity) AssetDatabase::WriteRevertAssets
0x0000000140E6D245 (Unity) EditorSceneManager::ShouldSaveScenesAndAssets
0x0000000140E6C8A7 (Unity) EditorSceneManager::SaveScenes
0x0000000140E64E29 (Unity) EditorSceneManager::FileMenuSave
0x0000000140DDC381 (Unity) FileMenu::Execute
0x00000001412A8ABD (Unity) MenuController::ExecuteMenuItem
0x00000001412A85E5 (Unity) MenuController::ExecuteMainMenuItem
0x00000001422A196D (Unity) EditorApplication_CUSTOM_ExecuteMenuItem
0x000000003B14BD3E (Mono JIT Code) (wrapper managed-to-native) UnityEditor.EditorApplication:ExecuteMenuItem (string)
0x000000003B14BC0B (Mono JIT Code) [C:\buildslave\unity\build\Modules\ShortcutManagerEditor\ShortcutAttributeDiscoveryProvider.cs:140] UnityEditor.ShortcutManagement.MenuItemEntryDiscoveryInfo:<MenuItemEntryDiscoveryInfo>m__0 (UnityEditor.ShortcutManagement.ShortcutArguments)
0x000000003B1465D3 (Mono JIT Code) [C:\buildslave\unity\build\Modules\ShortcutManagerEditor\Trigger.cs:115] UnityEditor.ShortcutManagement.Trigger:HandleKeyEvent (UnityEngine.Event,UnityEditor.ShortcutManagement.IContextManager)
0x000000003B144853 (Mono JIT Code) [C:\buildslave\unity\build\Modules\ShortcutManagerEditor\ShortcutController.cs:95] UnityEditor.ShortcutManagement.ShortcutController:HandleKeyEvent (UnityEngine.Event)
0x000000003B144623 (Mono JIT Code) [C:\buildslave\unity\build\Modules\ShortcutManagerEditor\ShortcutController.cs:32] UnityEditor.ShortcutManagement.ShortcutIntegration:EventHandler ()
0x000000003B1443DD (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\EditorApplication.cs:329] UnityEditor.EditorApplication:Internal_CallGlobalEventHandler ()
0x000000005353A855 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
0x00007FFEFD0BBE4B (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
0x00007FFEFD041E32 (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:2919] do_runtime_invoke
0x00007FFEFD04AE3F (mono-2.0-bdwgc) [c:\buildslave\mono\build\mono\metadata\object.c:2966] mono_runtime_invoke
0x0000000140C007BA (Unity) scripting_method_invoke
0x0000000140BF0D8A (Unity) ScriptingInvocation::Invoke
0x0000000140BEADC5 (Unity) ScriptingInvocation::Invoke<void>
0x00000001401D28E1 (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallGlobalEventHandler
0x0000000141288A66 (Unity) CallGlobalInputEvent
0x000000014147B955 (Unity) GUIView::ProcessEventMessages
0x00000001414749C9 (Unity) GUIView::GUIViewWndProc
0x00007FFF5CBB6D41 (USER32) CallWindowProcW
0x00007FFF5CBB6713 (USER32) DispatchMessageW
0x0000000141494FCF (Unity) MainMessageLoop
0x0000000141496AC6 (Unity) WinMain
0x0000000142479C5A (Unity) __scrt_common_main_seh
0x00007FFF5B523034 (KERNEL32) BaseThreadInitThunk
0x00007FFF5D793691 (ntdll) RtlUserThreadStart

Because of the irregularity of the error I haven't had much luck tracking down information on it; however, it does seem to occur specifically with PM installed. Talking to some folks at Unity, it seems like they have a bug ticket open with pretty much an identical stack trace. They are able to replicate the bug with the following code, which keeps data at the same address but potentially switching between types at run-time:

Code: [Select]
public class Foo {
    [StructLayout(LayoutKind.Explicit)]
    public struct Crasher {
        public Crasher(int indicator) {
            referenceType = null;
            valueType = 0;
        }

        [FieldOffset(0)] public int valType;
        [FieldOffset(0)] public GameObject refType;

        public static Crasher crash = new Crasher(0);
}

This is apparently done in the name of convenience, but results in the engine throwing an uncaught exception and crashing.

Bit of a long shot, but do any of the above stack traces look familiar, or like something folks have addressed in the past? Does the suggested val/ref type commingling look like something done in the PM internals, which could cause the crash?

Thanks for any insight.

15
Playmaker Bug Reporting / Re: Playmaker Editor make unity crash
« on: October 18, 2018, 11:45:25 AM »
I just got a response from the bug report I filed through Unity itself:

Quote
Hey,

Thank you for submitting a bug to Unity.

We have identified this issue as a duplicate of an existing known bug and we will be closing the issue. The information you have supplied will help us further in the resolution.

The case is not public, however, it is fixed in upcoming Unity 2019.1. Unfortunately, for now we cannot specify the ETA of the public release, nor the status of potential backports.

If you have further questions, feel free to contact us.

Regards,
QA Team

...so for now I guess we'll just wait on a fix and try to mitigate the problem as much as possible.

I'll still send you a PM with a link to our project; I'm not sure it'll be super instructive (there's a lot of FSMs that kinda got thrown together and I'm still coming to grips with that myself), but you might notice something that stands out as dangerous.

Pages: [1] 2