static void AddObjectPath(ref string sPath, Localize localizeCmp, Object NewObj) { if (RemoveResourcesPath(ref sPath)) { return; } // If its not in the Resources folder and there is no object reference already in the // Reference array, then add that to the Localization component or the Language Source if (HasObjectInReferences(NewObj, localizeCmp)) { return; } if (localizeCmp != null) { localizeCmp.AddTranslatedObject(NewObj); EditorUtility.SetDirty(localizeCmp); } else if (mLanguageSource != null) { mLanguageSource.AddAsset(NewObj); EditorUtility.SetDirty(mLanguageSource); } }