private IEnumerator InitializeScene() { if (initParams != null) { avatarProvider = initParams.avatarProvider; sceneToReturn = initParams.sceneToReturn; currentAvatarCode = initParams.avatarCode; useAnimations = initParams.useAnimations; #if !UNITY_WEBGL IMeshConverter meshConverter = AvatarSdkMgr.IoCContainer.Create <IMeshConverter>(); if (meshConverter.IsObjConvertEnabled) { convertToObjButton.gameObject.SetActive(true); } if (meshConverter.IsFBXExportEnabled) { fbxExportButton.gameObject.SetActive(true); } #endif #if UNITY_EDITOR prefabButton.gameObject.SetActive(true); #endif settingsPanel.SetActive(initParams.showSettings); animationsPanel.SetActive(initParams.useAnimations); blendshapesPanel.SetActive(!initParams.useAnimations); if (initParams.faceAvatarRequest != null) { isWebGLDemo = true; headAvatarCode = currentAvatarCode; StartCoroutine(WaitFaceAvatarCalculations(initParams.faceAvatarRequest)); } initParams = null; yield return(ShowAvatar(currentAvatarCode)); } else { Debug.LogError("Scene parameters were no set!"); } }
public static void SetSceneParams(SceneParams sceneParams) { initParams = sceneParams; }