Where the heck is Unity's CrossPlatformValidator?

断了今生、忘了曾经 提交于 2019-12-21 15:15:12

问题


I'm trying to use Unity's excellent new CrossPlatformValidator

(Such as seen ...
http://docs.unity3d.com/Manual/UnityIAPValidatingReceipts.html or
https://docs.google.com/document/d/1dJzeoGPeUIUetvFCulsvRz1TwRNOcJzwTDVf23gk8Rg)

But it can't be found! Naturally I am ...

using UnityEngine;
using UnityEngine.Purchasing;

I also tried different stripping and .Net levels. Nothing.

Anyone have a clue about this?

The type or namespace name `CrossPlatformValidator' could not be found. Are you missing a using directive or an assembly reference?


回答1:


Stuff like this is usually found at UnityEngine.Experimental but it wasn't there when I looked so I guess it is not a new feature.

1. You can find it by going to Windows -> Services. Sign in on the Window displayed, usually on the right.

2. Create a Project ID on that Window.

3. Click on In-APP Purchasing. It is checked to OFF, click on it then click Enable.

Note: You must Sign in to be able to Enable it and you must Enable it before you can use it from Script.


Finally, the completely undocumented namespace is:

using UnityEngine.Purchasing.Security;

note that one can see this in the generated "tangle" files, for example, if one forgets it. :/




回答2:


Mono Dev can often help you find things.

Right click on unresolved class -> Resolve

Screenshot of resolve function in Mono Dev.:



来源:https://stackoverflow.com/questions/36167767/where-the-heck-is-unitys-crossplatformvalidator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!