Example #1
0
        void OnEnable()
        {
            string version = CaronteSharp.Caronte.GetNativeDllVersion();
            string versionTypeName;

            if (CarVersionChecker.IsFreeVersion())
            {
                versionTypeName = " FREE";
                versionType_    = VersionType.Free;
            }
            else if (CarVersionChecker.IsPremiumVersion())
            {
                if (CarVersionChecker.IsEvaluationVersion())
                {
                    versionTypeName = " PREMIUM TRIAL";
                    versionType_    = VersionType.Premium | VersionType.Evaluation;
                }
                else
                {
                    versionTypeName = " PREMIUM";
                    versionType_    = VersionType.Premium;
                }
            }
            else // PRO VERSION
            {
                if (CarVersionChecker.IsEvaluationVersion())
                {
                    versionTypeName = " PRO TRIAL";
                    versionType_    = VersionType.Pro | VersionType.Evaluation;
                }
                else
                {
                    versionTypeName = " PRO";
                    versionType_    = VersionType.Pro;
                }
            }

            if (CarVersionChecker.DoVersionExpires())
            {
                expirationDateTime_ = CarVersionChecker.GetExpirationDateDateInSeconds();
            }

            if (CarVersionChecker.IsAdvanceCompressionVersion())
            {
                compressionType_ = CompressionType.Advanced;
            }
            else
            {
                compressionType_ = CompressionType.Normal;
            }

            companyIcon_   = CarEditorResource.LoadEditorTexture(CarVersionChecker.CompanyIconName);
            versionString_ = "Version: " + version + versionTypeName + " \n(Compression type: " + compressionType_.ToString() + ")";
        }
Example #2
0
        private void AddDefaultDustParticlesEventsReceiver()
        {
            UnityEngine.Object     prefabObject         = CarEditorResource.LoadPrefab("DustParticleEventsReceiver.prefab");
            UnityEngine.GameObject dustEventsReceiverGO = (GameObject)PrefabUtility.InstantiatePrefab(prefabObject);
            PrefabUtility.DisconnectPrefabInstance(dustEventsReceiverGO);
            dustEventsReceiverGO.transform.parent = crAnimation_.transform;

            CRDustEventsReceiver dustER = dustEventsReceiverGO.GetComponent <CRDustEventsReceiver>();

            UnityEventTools.AddPersistentListener(crAnimation_.animationEvent, dustER.ProcessAnimationEvent);
            EditorUtility.SetDirty(crAnimation_);
        }
Example #3
0
 void LoadCaronteIcon()
 {
     if (ic_logoCaronte_ == null)
     {
         bool isUnityFree = !UnityEditorInternal.InternalEditorUtility.HasPro();
         if (isUnityFree)
         {
             ic_logoCaronte_ = CarEditorResource.LoadEditorTexture("cr_caronte_logo_free");
         }
         else
         {
             ic_logoCaronte_ = CarEditorResource.LoadEditorTexture("cr_caronte_logo_pro");
         }
     }
 }
Example #4
0
        private static void LoadStrings(string lang)
        {
            TextAsset stringsFileAsset = CarEditorResource.LoadTextAsset("cr_strings" + (String.IsNullOrEmpty(lang) ? "" : ("_" + lang + ".xml")));

            if (stringsFileAsset != null)
            {
                XmlDocument xmlStringsDoc = new XmlDocument();
                xmlStringsDoc.LoadXml(stringsFileAsset.text);

                foreach (XmlNode xmlNode in xmlStringsDoc.DocumentElement.ChildNodes)
                {
                    strings[xmlNode.Attributes["name"].Value] = Regex.Unescape(xmlNode.InnerText);
                }
            }
        }
Example #5
0
 private static void RegisterHierarchyCB()
 {
     ic_CaronteFX_ = CarEditorResource.LoadEditorTexture("cr_icon_carontefx");
     EditorApplication.hierarchyWindowItemOnGUI += HierarchyItemCB;
 }