UnityEditor.HumanTemplate.ClearTemplate C# (CSharp) Method

ClearTemplate() private method

private ClearTemplate ( ) : void
return void
        public extern void ClearTemplate();
        [MethodImpl(MethodImplOptions.InternalCall)]

Usage Example

        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);
        }
All Usage Examples Of UnityEditor.HumanTemplate::ClearTemplate