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() + ")"; }
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"); } } }
private static void RegisterHierarchyCB() { ic_CaronteFX_ = CarEditorResource.LoadEditorTexture("cr_icon_carontefx"); EditorApplication.hierarchyWindowItemOnGUI += HierarchyItemCB; }