11tomi12

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Overridden OnValidate() causes MissingException Error #13085
    11tomi12
    Participant

    Hello and thank you for your reply!

    First of all thanks for the spacebar bug solution.
    About Coroutines: I honestly didn’t realize they only work in play mode. I removed them and made a simple fix. I used them in first place because when OnValidate was called, node ID was 0, which caused problem with my implemented ID generation.

    I still have one bug, that occurs when opening search window for nodes:
    InvalidCastException: Cannot cast from source type to destination type.
    UnityEditor.EditorGUILayout.BeginScrollView (Vector2 scrollPosition, Boolean alwaysShowHorizontal, Boolean alwaysShowVertical, UnityEngine.GUIStyle horizontalScrollbar, UnityEngine.GUIStyle verticalScrollbar, UnityEngine.GUIStyle background, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:7957)

    Origin is class GenericMenuBrowser.cs line 345. This error occurs even if no nodes are in graph.

    in reply to: Calling child class method from object type Node #13046
    11tomi12
    Participant

    I figured it out!

    I didn’t see node is type ActionNode. So I casted it into ActionNode and then took the action and casted it into I2Say, which is deriving from ActionTask:

    ActionNode an = (ActionNode)node;
    I2Say say = (I2Say)an.action;
    say.RemoveTermReference();

Viewing 2 posts - 1 through 2 (of 2 total)