Ejemplo n.º 1
0
        public static string GetArtifactFile(this ActionAsset actionAsset, ActionGraphGlobalSettings settings)
        {
            var path = AssetDatabase.GetAssetPath(actionAsset);

            if (string.IsNullOrEmpty(path))
            {
                return(null);
            }
            var importer = AssetImporter.GetAtPath(path);
            var guid     = importer.userData;

            if (string.IsNullOrEmpty(guid))
            {
                return(settings.CreateArtifactPath());
            }
            var artifactPath = AssetDatabase.GUIDToAssetPath(guid);

            if (string.IsNullOrEmpty(artifactPath))
            {
                return(settings.CreateArtifactPath());
            }
            return(artifactPath);
        }
Ejemplo n.º 2
0
 public override GraphElement CreateNode(ActionGraphView graphView, ActionGraphGlobalSettings settings, Rect layout, string guid = null) => data.CreateNode(graphView, settings, layout, guid);
Ejemplo n.º 3
0
 public abstract GraphElement CreateNode(ActionGraphView graphView, ActionGraphGlobalSettings settings, Rect layout, string guid = null);
Ejemplo n.º 4
0
 public ActionIdField(string label) : base(label, GetItems(), 0)
 {
     settings = ProjectUtility.GetOrCreateProjectSettings <ActionGraphGlobalSettings>();
     this.formatListItemCallback      = FormatCell;
     this.formatSelectedValueCallback = FormatCell;
 }
Ejemplo n.º 5
0
 private void OnEnable()
 {
     settings = ProjectUtility.GetProjectSettings <ActionGraphGlobalSettings>();
 }