Example #1
0
    public static bool Open(int instanceID, int line)
    {
        TestCodeContainer container = EditorUtility.InstanceIDToObject(instanceID) as TestCodeContainer;

        if (container != null && container.TreeGraph != null)
        {
            Open(container);
            return(true);
        }

        return(false);
    }
Example #2
0
    public static void Open(TestCodeContainer container)
    {
        if (container == null || container.TreeGraph == null)
        {
            return;
        }

        TestCodeEditorWindow w = GetWindow(typeof(TestCodeEditorWindow), false, "TestCodeEditor", true) as TestCodeEditorWindow;

        w.targetContainer                 = container;
        w.selectedTestCase                = null;
        w.testCasesScrollPos              = Vector2.zero;
        w.parametersScrollPos             = Vector2.zero;
        w.extraConditionTextAreaScrollPos = Vector2.zero;
        w.otherNodesScrollPos             = Vector2.zero;
    }