Exemplo n.º 1
0
 void OnDestroy()
 {
     if (graphEditor != null)
     {
         graphEditor.OnDisable();
         graphEditor.OnDestroy();
         graphEditor = null;
     }
 }
Exemplo n.º 2
0
        public void Init(SpatialConstraintAsset assetBeingEdited, SpatialConstraintsEditorAssignmentState assignmentState)
        {
            graphEditor = CreateInstance <SpatialConstraintsGraphEditor>();
            var graph = (assetBeingEdited != null) ? assetBeingEdited.Graph : null;

            graphEditor.Init(graph, position);
            graphEditor.AssignmentState  = assignmentState;
            graphEditor.AssetBeingEdited = assetBeingEdited;

            Repaint();
        }