本文整理汇总了C#中ViewContext.GetContextId方法的典型用法代码示例。如果您正苦于以下问题:C# ViewContext.GetContextId方法的具体用法?C# ViewContext.GetContextId怎么用?C# ViewContext.GetContextId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewContext
的用法示例。
在下文中一共展示了ViewContext.GetContextId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start () {
#if COHERENT_UI_EVALUATION_UNITY3D
StartActivator();
#endif
if (SystemInfo.graphicsDeviceVersion.StartsWith("Direct3D 11")
|| SystemInfo.operatingSystem.Contains("Mac"))
{
DeviceSupportsSharedTextures = true;
}
if (m_UISystem == null)
{
m_SystemListener = (SystemListenerFactoryFunc != null)? SystemListenerFactoryFunc(this.OnSystemReady) : new SystemListener(this.OnSystemReady);
if (FileHandlerFactoryFunc != null)
{
m_FileHandler = FileHandlerFactoryFunc();
}
#if !UNITY_ANDROID || UNITY_EDITOR
if (m_FileHandler == null)
{
Debug.LogWarning("Unable to create file handler using factory function! Falling back to default handler.");
m_FileHandler = new UnityFileHandler();
}
#endif
#if UNITY_EDITOR || COHERENT_UNITY_STANDALONE || COHERENT_UNITY_UNSUPPORTED_PLATFORM
ContextSettings settings = new ContextSettings()
{
EnableProxy = this.EnableProxy,
AllowCookies = this.AllowCookies,
CookiesResource = "file:///" + Application.persistentDataPath + '/' + this.CookiesResource,
CachePath = Path.Combine(Application.temporaryCachePath, this.CachePath),
HTML5LocalStoragePath = Path.Combine(Application.temporaryCachePath, this.HTML5LocalStoragePath),
ForceDisablePluginFullscreen = this.ForceDisablePluginFullscreen,
DisableWebSecurity = this.DisableWebSecurity,
DebuggerPort = this.DebuggerPort,
};
#elif UNITY_IPHONE || UNITY_ANDROID
ContextSettings settings = new ContextSettings() {
iOS_UseURLCache = m_UseURLCache,
iOS_URLMemoryCacheSize = (uint)m_MemoryCacheSize,
iOS_URLDiskCacheSize = (uint)m_DiskCacheSize,
};
int sdkVersion = Coherent.UI.Mobile.Versioning.SDKVersion;
#endif
if (string.IsNullOrEmpty(Coherent.UI.License.COHERENT_KEY))
{
throw new System.ApplicationException("You must supply a license key to start Coherent UI! Follow the instructions in the manual for editing the License.cs file.");
}
m_UISystem = CoherentUILibrary.CreateViewContext(
settings, m_SystemListener, m_FileHandler);
if (m_UISystem == null)
{
throw new System.ApplicationException("Creating a ViewContext"
+ " failed!");
}
Debug.Log ("Coherent UI system initialized..");
#if UNITY_EDITOR || COHERENT_UNITY_STANDALONE
CoherentUIViewRenderer.WakeRenderer(
(byte)m_UISystem.GetContextId());
#endif
}
m_StartTime = Time.realtimeSinceStartup;
DontDestroyOnLoad(this.gameObject);
}