Example #1
0
        public bool BeginNewAssetCreation(int instanceID, EndNameEditAction newAssetEndAction, string filePath, Texture2D icon, string newAssetResourceFile)
        {
            string text;

            if (!filePath.StartsWith("assets/", StringComparison.CurrentCultureIgnoreCase))
            {
                text = AssetDatabase.GetUniquePathNameAtSelectedPath(filePath);
            }
            else
            {
                text = AssetDatabase.GenerateUniqueAssetPath(filePath);
            }
            if (!CreateAssetUtility.IsPathDataValid(text))
            {
                Debug.LogErrorFormat("Invalid generated unique path '{0}' (input path '{1}')", new object[]
                {
                    text,
                    filePath
                });
                this.Clear();
                return(false);
            }
            this.m_InstanceID      = instanceID;
            this.m_Path            = text;
            this.m_Icon            = icon;
            this.m_EndAction       = newAssetEndAction;
            this.m_ResourceFile    = newAssetResourceFile;
            Selection.activeObject = EditorUtility.InstanceIDToObject(instanceID);
            return(true);
        }
 public void OnAwake()
 {
     this.m_NewAssetIndexInList = -1;
     this.m_RenameOverlay.Clear();
     this.m_CreateAssetUtility = new CreateAssetUtility();
 }
 public void OnAwake()
 {
     this.m_RenameOverlay.Clear();
     this.m_CreateAssetUtility = new CreateAssetUtility();
 }
		public void OnAwake()
		{
			this.m_RenameOverlay.Clear();
			this.m_CreateAssetUtility = new CreateAssetUtility();
		}
		public void OnAwake()
		{
			this.m_NewAssetIndexInList = -1;
			this.m_RenameOverlay.Clear();
			this.m_CreateAssetUtility = new CreateAssetUtility();
		}