|
Post by Drum on Mar 30, 2015 9:09:54 GMT
Hi all,
I'm getting a bunch of compiler errors when I try to import Core Gamekit into an existing project. The errors are all along the lines of:
Assets/DarkTonic/CoreGameKit/Scripts/WorldVariables/InGameWorldVariable.cs(43,20): error CS0103: The name `PlayerPrefs' does not exist in the current context
I tried creating an empty project and importing Core Gamekit in to that and it works fine. Are there any clashes or incompatibilities I should be aware of?
Thanks in advance,
Drum
|
|
|
Post by DarkTonic Dev on Mar 30, 2015 14:58:46 GMT
I just tried with an empty project, downloaded from Asset Store and got no compile errors as well.
You will need to check if you have another class named PlayerPrefs in your project, it must be a problem like that.
OR
It might be a platform-specific error. What platform are you targeting?
And what version of Unity are you on?
Also, look for any compile errors that aren't Core GameKit and list them here, if any. That might be a clue.
|
|
|
Post by Drum on Mar 30, 2015 16:27:43 GMT
Hi,
Unity version is Pro 4.6.2f1
The only immediate compile errors are multiple (8) instances on the script InGameWorldVariable.cs Removing that script then throws errors in WorldVariableTracker.cs and, on subsequent removal, on a bunch of other WorldVariable related scripts.
I'm going to try rebuilding from scratch with my original stuff plus all the various 3rd party stuff piece by piece to see where the error creeps in.
cheers.
|
|
|
Post by DarkTonic Dev on Mar 30, 2015 19:05:37 GMT
Thanks.
However you didn't answer what platform you are building for. Is it Web Player by chance? Another custom emailed me with similar errors when using Web Player, which I'm about to look into.
|
|
duxlegatus
Guest
Posts: 0
|
Post by duxlegatus on Mar 31, 2015 20:02:38 GMT
I am getting the same error on web player platform. When I switched to android it seems to be fine. If you could fix that it would be awesome! It's currently my only available testing platform  Thank you for an awesome product!!!! Keep up the great work!!
|
|
|
Post by DarkTonic Dev on Mar 31, 2015 23:48:42 GMT
I've already fixed, but need to wait for Asset Store to approve. Could be a week or more.
Here's the fix, change the top of InGameWorldVariable.cs to this:
using System; #if UNITY_WEBPLAYER || UNITY_WP8 || UNITY_METRO // THIS LINE BELOW IS THE ONE using UnityEngine; #else using PlayerPrefs = PreviewLabs.PlayerPrefs; #endif
|
|