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