示例#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);
        }
示例#2
0
 public override GraphElement CreateNode(ActionGraphView graphView, ActionGraphGlobalSettings settings, Rect layout, string guid = null) => data.CreateNode(graphView, settings, layout, guid);
示例#3
0
 public abstract GraphElement CreateNode(ActionGraphView graphView, ActionGraphGlobalSettings settings, Rect layout, string guid = null);
示例#4
0
 public ActionIdField(string label) : base(label, GetItems(), 0)
 {
     settings = ProjectUtility.GetOrCreateProjectSettings <ActionGraphGlobalSettings>();
     this.formatListItemCallback      = FormatCell;
     this.formatSelectedValueCallback = FormatCell;
 }
示例#5
0
 private void OnEnable()
 {
     settings = ProjectUtility.GetProjectSettings <ActionGraphGlobalSettings>();
 }