Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Resources.Load stops working after I2 Localization

Resources.Load stops working after I2 Localization 2 months 6 days ago #3102

  • Oakshiro
  • Oakshiro's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 0
I've found a VERY strange bug that is driving me crazy.

I must say in advance that the version I am using is v2.8.6 f2 and that this bug ONLY HAPPENS ON ANDROID BUILDS.


On my first scene, I have a debug.Log trace to show the detected language:

Debug.Log(I2.Loc.LocalizationManager.CurrentLanguage);


After that, I can see this trace in the logcat:

06-11 16:44:34.152 9310 9337 E Unity : NullReferenceException
06-11 16:44:34.152 9310 9337 E Unity : at UnityEngine.Object.get_name () [0x00000] in <filename unknown>:0
06-11 16:44:34.152 9310 9337 E Unity : at I2.Loc.LanguageSource.GetSourcePlayerPrefName () [0x00000] in <filename unknown>:0
06-11 16:44:34.152 9310 9337 E Unity : at I2.Loc.LanguageSource.Import_Google (Boolean ForceUpdate, Boolean justCheck) [0x00000] in <filename unknown>:0
06-11 16:44:34.152 9310 9337 E Unity : at I2.Loc.LocalizationManager+<Delayed_Import_Google>c__Iterator0.MoveNext () [0x00000] in <filename unknown>:0
06-11 16:44:34.152 9310 9337 E Unity : at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0


And strangely enough, whenever I try to instantiate a new Resource using de Resources.Load function (the Loading spinner between scenes), I get this error:

06-11 17:18:12.583 12196 12224 E Unity : ArgumentException: The Object you want to instantiate is null.
06-11 17:18:12.583 12196 12224 E Unity : at UnityEngine.Object.CheckNullArgument (System.Object arg, System.String message) [0x00000] in <filename unknown>:0
06-11 17:18:12.583 12196 12224 E Unity : at UnityEngine.Object.Instantiate (UnityEngine.Object original) [0x00000] in <filename unknown>:0
06-11 17:18:12.583 12196 12224 E Unity : at Utils.LoadScene (System.String sceneName, Boolean removeLoadingScreenWhenLoaded) [0x00000] in <filename unknown>:0
06-11 17:18:12.583 12196 12224 E Unity : at LoginScreenController.<DoLogin>m__0 () [0x00000] in <filename unknown>:0
06-11 17:18:12.583 12196 12224 E Unity : at INLIFEAccessor.InitGame (Boolean success, .Game g, System.String error) [0x00000] in <filename unknown>:0
06-11 17:18:12.583 12196 12224 E Unity : at LoadEnvelope`1[Game].ParseResult (System.String text, System.String error) [0x00000] in <filename unknown>:0
06-11 17:18:12.583 12196 12224 E Unity : at StatusManagerServer+<DownloadUrl>c__Iterator0.MoveNext () [0x00000] in <filename unknown>:0
06-11 17:18:12.583 12196 12224 E Unity : at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0

What is REALLY strange is that, if I remove the first Debug.Log it DOES work, although the "LanguageSource.Import_Google" exception keeps on happening.


Now, I can confirm that (double checked):

1.- The assets are in the Resources folder and their names are correct
2.- It ALWAYS fails if I let the debug.Log there, and ALWAYS works if i remove it
3.- I moved the prefab from the Resources Folder to a 3rdParty/I2/Resources folder, but that should not interfere at all
4.- I already clicked on VERIFY and reselected the spreadsheet in the I2 prefab

Any clue?

Thanks!
The administrator has disabled public write access.

Resources.Load stops working after I2 Localization 2 months 6 days ago #3103

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 1112
  • Thank you received: 234
  • Karma: 68
That is strange.
Are you using just the i2Languages.prefab or do you have any LanguageSource instantiated in your scenes?
If you disable Google Live Synchronization (set Google Update Frequency to "NEVER") does this error goes away?
Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
Last Edit: 2 months 6 days ago by Frank.
The administrator has disabled public write access.

Resources.Load stops working after I2 Localization 2 months 5 days ago #3106

  • Oakshiro
  • Oakshiro's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 0
Ok, I tried setting the Google Live Synchronization to NEVER. And the error related to the google docs fetching is gone.
But it still fails with the "The object you are trying to instantiate is null" whenever I let the debug.log in the splash screen.

I also tried downgrading I2 to v2.8.1 , but the same happens.

It is very strange. Could it be related in any way with the new privacy policy updates from the google side?
Just in case, I double checked the script at google drive and everything is ok...

any ideas?
The administrator has disabled public write access.

Resources.Load stops working after I2 Localization 2 months 4 days ago #3107

  • Oakshiro
  • Oakshiro's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 0
I was thinking... would it make sense that it could be because of some permissions needed in the manifest? I have a custom manifest.xml.
Which permissions should be granted in order for I2 Localization to work?
The administrator has disabled public write access.

Resources.Load stops working after I2 Localization 2 months 4 days ago #3108

  • Oakshiro
  • Oakshiro's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 0
Ok. I think I found the root of the problem.
Whenever the user enters the Login Scene, I was detecting and destroying all "DontdestroyOnLoad" objects, in order to reset the game when the user did logoff from the options menu, but I think this could be breaking something in the I2 Localization Instance.

Now it seems to be instantiating everything ok, but I still have a problem. Maybe not related to this same bug, but just in case:

The normal flow goes from Splash to Login. As i said, I already got rid of the "destroy all static objects" method, but the labels are not getting localized at all.

In the Splash scene, I must reset the language, to allow the users to switch from one language to another in their tablets and smartphones, but when I change it I end up with the Localization to stop working.

I simply do this on the Start method ...

I2.Loc.LocalizationManager.CurrentLanguage = Application.systemLanguage.ToString();
The administrator has disabled public write access.

Resources.Load stops working after I2 Localization 2 months 4 days ago #3109

  • Oakshiro
  • Oakshiro's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 0
Does this Error makes any sense?
Error Access to the path "/storage/emulated/0/tracesPending.csv" is denied.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.202 seconds
Colors