ClearTemplate() private method

private ClearTemplate ( ) : void
return void
コード例 #1
0
        private void SaveHumanTemplate()
        {
            // Go forward with presenting user a save clip dialog
            string newTemplatePath = EditorUtility.SaveFilePanelInProject("Create New Human Template", "New Human Template", "ht", "Create a new human template");

            // If user canceled or save path is invalid, we can't create a template
            if (newTemplatePath == "")
            {
                return;
            }

            // At this point we know that we can create a template
            HumanTemplate humanTemplate = new HumanTemplate();

            humanTemplate.ClearTemplate();

            for (int i = 0; i < m_Bones.Length; i++)
            {
                if (m_Bones[i].bone != null)
                {
                    humanTemplate.Insert(m_Bones[i].humanBoneName, m_Bones[i].bone.name);
                }
            }

            AssetDatabase.CreateAsset(humanTemplate, newTemplatePath);
        }
コード例 #2
0
        private void SaveHumanTemplate()
        {
            string text = EditorUtility.SaveFilePanelInProject("Create New Human Template", "New Human Template", "ht", "Create a new human template");

            if (!(text == ""))
            {
                HumanTemplate humanTemplate = new HumanTemplate();
                humanTemplate.ClearTemplate();
                for (int i = 0; i < this.m_Bones.Length; i++)
                {
                    if (this.m_Bones[i].bone != null)
                    {
                        humanTemplate.Insert(this.m_Bones[i].humanBoneName, this.m_Bones[i].bone.name);
                    }
                }
                AssetDatabase.CreateAsset(humanTemplate, text);
            }
        }
コード例 #3
0
        private void SaveHumanTemplate()
        {
            string path = EditorUtility.SaveFilePanelInProject("Create New Human Template", "New Human Template", "ht", string.Format("Create a new human template"));

            if (path == string.Empty)
            {
                return;
            }
            HumanTemplate humanTemplate = new HumanTemplate();

            humanTemplate.ClearTemplate();
            for (int index = 0; index < this.m_Bones.Length; ++index)
            {
                if ((UnityEngine.Object) this.m_Bones[index].bone != (UnityEngine.Object)null)
                {
                    humanTemplate.Insert(this.m_Bones[index].humanBoneName, this.m_Bones[index].bone.name);
                }
            }
            AssetDatabase.CreateAsset((UnityEngine.Object)humanTemplate, path);
        }
コード例 #4
0
        private void SaveHumanTemplate()
        {
            string message = string.Format("Create a new human template", new object[0]);
            string text    = EditorUtility.SaveFilePanelInProject("Create New Human Template", "New Human Template", "ht", message);

            if (text == string.Empty)
            {
                return;
            }
            HumanTemplate humanTemplate = new HumanTemplate();

            humanTemplate.ClearTemplate();
            for (int i = 0; i < this.m_Bones.Length; i++)
            {
                if (this.m_Bones[i].bone != null)
                {
                    humanTemplate.Insert(this.m_Bones[i].humanBoneName, this.m_Bones[i].bone.name);
                }
            }
            AssetDatabase.CreateAsset(humanTemplate, text);
        }
コード例 #5
0
 private void SaveHumanTemplate()
 {
   string path = EditorUtility.SaveFilePanelInProject("Create New Human Template", "New Human Template", "ht", string.Format("Create a new human template"));
   if (path == string.Empty)
     return;
   HumanTemplate humanTemplate = new HumanTemplate();
   humanTemplate.ClearTemplate();
   for (int index = 0; index < this.m_Bones.Length; ++index)
   {
     if ((UnityEngine.Object) this.m_Bones[index].bone != (UnityEngine.Object) null)
       humanTemplate.Insert(this.m_Bones[index].humanBoneName, this.m_Bones[index].bone.name);
   }
   AssetDatabase.CreateAsset((UnityEngine.Object) humanTemplate, path);
 }
コード例 #6
0
		private void SaveHumanTemplate()
		{
			string message = string.Format("Create a new human template", new object[0]);
			string text = EditorUtility.SaveFilePanelInProject("Create New Human Template", "New Human Template", "ht", message);
			if (text == string.Empty)
			{
				return;
			}
			HumanTemplate humanTemplate = new HumanTemplate();
			humanTemplate.ClearTemplate();
			for (int i = 0; i < this.m_Bones.Length; i++)
			{
				if (this.m_Bones[i].bone != null)
				{
					humanTemplate.Insert(this.m_Bones[i].humanBoneName, this.m_Bones[i].bone.name);
				}
			}
			AssetDatabase.CreateAsset(humanTemplate, text);
		}