Strange population of quotation marks

More
4 years 3 months ago - 4 years 3 months ago #481 by Frank
That's weird indeed, that means that unity is receiving a different version from the webservice. So, it must likely still have the previous WebService installed.

Just to be sure, After clicking "Install" did you deployed the new WebService?
Following the steps:
***************************************************************************************

Follow this steps to Install the Web Service.
If you find any issue, here is an ilustraded step by step guide:


1- On the menu, select "Publish" and then "Deploy as web app"

2- In the window that opens
    - click "Save Version"
    - In "Execute app as:"  select "me(your email)"
    - In "Who has access to the app:" select "any one, even anonymous"
    
3- In the new window that opens, Copy the URL at "Current Web App URL".
   That URL will have the format: https://script.google.com/macros/s/XXXXXXXXX/exec

4- In the menu, select "Run" and then "DoGet"

5- Authorize the script to access your spreadsheets and file date data

6- Paste the URL from step 3 in the "Web Service URL" on the Unity Editor



***************************************************************************************/

Otherwise it will just keep using the old WebService.

If after doing that it still not using the right WebService, you can force by doing this instead, Notice that the initial steps are different:
1- On the menu, select "File and then "Manage Versions"

2- In the window that opens, click "Save New Version"

3- On the menu select "Publish" and then "Deploy as web app"
    - In the Project Version dropdown, select the new version you just created
    - In "Execute app as:"  select "me(your email)"
    - In "Who has access to the app:" select "any one, even anonymous"

4- In the new window that opens, Copy the URL at "Current Web App URL".
   That URL will have the format: https://script.google.com/macros/s/XXXXXXXXX/exec

5- In the menu, select "Run" and then "DoGet"

6- Authorize the script to access your spreadsheets and file date data

7- Paste the URL from step 3 in the "Web Service URL" on the Unity Editor

If the last way works, please let me know and I will update the Install Steps accordingly

Thanks a lot,
Frank

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: 4 years 3 months ago by Frank.

Please Log in or Create an account to join the conversation.

More
4 years 3 months ago #482 by Frank

Okay, I've pinned down what I was doing wrong. I forgot to set the WebApp to be accessible to everyone, even anonymous.

It might be helpful if the error message was clearer that that was the issue. Poking around inside, I saw the LocalizationEditor wasn't even getting a version number from the WebApp, which is something that might be a way of detecting the Unity tools can't access the WebApp.


Thanks, I will update the plugin to detect that case!

Now the app is able to verify my WebSerivce, but now the refresh for the Google Drive list isn't finding any of my spreadsheets.


To avoid having player/team members access the spreadsheets that are not related to the localization, the plugin now only list the spreadsheets that start with "I2Loc"

If you need to show spreadsheets with other prefix or all spreadsheets, you can change that behavior by modifying the LocalizationPrefix in the WebService file Main.gs

Thanks,
Frank

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

Please Log in or Create an account to join the conversation.

More
4 years 3 months ago #483 by MolluskJesse
That last thing about the prefix did it. Things are operational once more!

YAY!

Now, before I say farewell, there was one other thing I wanted to bring up. Right now, if you import from a Google Doc, the editor is not marking itself as dirty. Thus, unless you fuss with some other part of the language data set, the entire object isn't getting marked as Dirty. That means, sometimes, even if you import the data in from Google it doesn't get saved to the prefab by unity's systems.

While I have a very dirty fix I've put int (pun intende), is this something you could see implementing in future versions?

The place where I add the SetDirty code is as follows:
//INSIDE THIS FUNCTION
public string Import_Google_Result( string JsonString, eSpreadsheetUpdateMode UpdateMode )
{
	//...//

	var SpreadSheet = data["spreadsheet"].AsObject;
	foreach (KeyValuePair<string, SimpleJSON.JSONNode> element in SpreadSheet)
	{
		Import_CSV( element.Key, element.Value, UpdateMode );

		// Only the first CSV should clear the Data
		if (UpdateMode == eSpreadsheetUpdateMode.Replace)
			UpdateMode = eSpreadsheetUpdateMode.Merge;
	}

	UnityEditor.EditorUtility.SetDirty(this);  // <=== THE LINE I ADDED
	return ErrorMsg;
}

Please Log in or Create an account to join the conversation.

More
4 years 3 months ago #484 by Frank
Done!

Thanks a lot,
Frank

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

Please Log in or Create an account to join the conversation.

Time to create page: 0.118 seconds
Template by JoomlaShine