コード例 #1
0
 private static void LogWarningOnlyInAuthoringMode(string message)
 {
     // We don't want to spam users with warning messages
     // but we want to catch them while creating tutorials
     if (ProjectMode.IsAuthoringMode())
     {
         Debug.LogWarning(message);
     }
 }
コード例 #2
0
        /// <summary>
        /// UnityEngine.ISerializationCallbackReceiver override, do not call.
        /// </summary>
        public void OnAfterDeserialize()
        {
            // TODO what's this? Is this needed?
            // Remove "-testable" suffix from assembly names
            if (!ProjectMode.IsAuthoringMode() && m_TypeName != null)
            {
                m_TypeName = m_TypeName.Replace("Assembly-CSharp-Editor-firstpass-testable", "Assembly-CSharp-Editor-firstpass");
                m_TypeName = m_TypeName.Replace("Assembly-CSharp-Editor-testable", "Assembly-CSharp-Editor");
                m_TypeName = m_TypeName.Replace("Assembly-CSharp-firstpass-testable", "Assembly-CSharp-firstpass");
                m_TypeName = m_TypeName.Replace("Assembly-CSharp-testable", "Assembly-CSharp");
            }

            // Backwards-compatibility for IET < 2.0 when the namespace and assemblies were Unity.InteractiveTutorials.*
            // instead of Unity.Tutorials.Core(.Editor).
            if (m_TypeName.IsNotNullOrEmpty())
            {
                m_TypeName = m_TypeName.Replace("Unity.InteractiveTutorials.Core", "Unity.Tutorials.Core.Editor");
                m_TypeName = m_TypeName.Replace("Unity.InteractiveTutorials", "Unity.Tutorials.Core.Editor");
            }
        }