Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue wrapping the SDK in a custom package (using UPM) #2510

Open
Noxalus opened this issue Mar 21, 2019 · 1 comment · May be fixed by #2976
Open

Issue wrapping the SDK in a custom package (using UPM) #2510

Noxalus opened this issue Mar 21, 2019 · 1 comment · May be fixed by #2976

Comments

@Noxalus
Copy link

Noxalus commented Mar 21, 2019

Hello everyone,

I'm trying to create a custom package for the SDK to be used in any project easily using the Unity Package Manager, but I get this error many times:

System.Exception: GooglePlayGames folder was renamed
  at GooglePlayGames.Editor.GPGSUtil.get_RootPath () [0x0003e] in C:\Projects\Plugins-Google\Vendors\GooglePlayServices\GooglePlayServices-0.9.62\Assets\GooglePlayGames\Editor\GPGSUtil.cs:129 
  at GooglePlayGames.Editor.GPGSProjectSettings..ctor () [0x0002c] in C:\Projects\Plugins-Google\Vendors\GooglePlayServices\GooglePlayServices-0.9.62\Assets\GooglePlayGames\Editor\GPGSProjectSettings.cs:57 
  at GooglePlayGames.Editor.GPGSProjectSettings.get_Instance () [0x0000e] in C:\Projects\Plugins-Google\Vendors\GooglePlayServices\GooglePlayServices-0.9.62\Assets\GooglePlayGames\Editor\GPGSProjectSettings.cs:39 
  at GooglePlayGames.Editor.GPGSUpgrader..cctor () [0x00001] in C:\Projects\Plugins-Google\Vendors\GooglePlayServices\GooglePlayServices-0.9.62\Assets\GooglePlayGames\Editor\GPGSUpgrader.cs:35 
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()

Looking at the code, I can see there is a check to find the GooglePlayGames folder directly at the root of the Assets folder, but as I'm in a project that uses this package, this folder is in the package hierarchy, not the project one.

Did somemone already tried to do what I want? Is the UPM is planned to be supported?

Thank you in advance for your answer ;)

@gluks
Copy link

gluks commented Jun 1, 2020

I had the same issue.
I decided to modify GPGSUtil.cs to change RootPath property according to this doc https://docs.unity3d.com/Manual/upm-assets.html

public static string RootPath
{
	get
	{
		if (string.IsNullOrEmpty(mRootPath))
		{
			mRootPath = "Packages/<package-name>/Runtime/GooglePlayGames";
		}
		return mRootPath;
	}
} 

Obviously, this is not the best solution but it seems to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants