//********描画時のリソース変更********// internal override void ChangeResourceOnDraw(AdvGraphicInfo graphic, float fadeTime) { Avatar.Material = graphic.RenderTextureSetting.GetRenderMaterialIfEnable(Avatar.Material); //既に描画されている場合は、クロスフェード用のイメージを作成 // bool crossFade = TryCreateCrossFadeImage(fadeTime); //新しくリソースを設定 AvatarData avatarData = graphic.File.UnityObject as AvatarData; Avatar.AvatarData = avatarData; Avatar.CachedRectTransform.sizeDelta = avatarData.Size; Avatar.AvatarPattern.SetPattern(graphic.RowData); //目パチを設定 SetEyeBlinkSync(graphic.EyeBlinkData); //口パクを設定 SetLipSynch(graphic.LipSynchData); //アニメーションを設定 SetAnimation(graphic.AnimationData); if (LastResource == null) { ParentObject.FadeIn(fadeTime, () => { }); } }
//********描画時のリソース変更********// internal override void ChangeResourceOnDraw(AdvGraphicInfo grapic, float fadeTime) { //新しくリソースを設定 if (LastResource != grapic) { currentObject = GameObject.Instantiate(grapic.File.UnityObject) as GameObject; Vector3 localPostion = currentObject.transform.localPosition; Vector3 localEulerAngles = currentObject.transform.localEulerAngles; Vector3 localScale = currentObject.transform.localScale; currentObject.transform.SetParent(this.transform); currentObject.transform.localPosition = localPostion; currentObject.transform.localScale = localScale; currentObject.transform.localEulerAngles = localEulerAngles; currentObject.ChangeLayerDeep(this.gameObject.layer); currentObject.gameObject.SetActive(true); animator = this.GetComponentInChildren <Animator>(); ChangeResourceOnDrawSub(grapic); } if (LastResource == null) { ParentObject.FadeIn(fadeTime, () => { }); } }
//********描画時のリソース変更********// internal override void ChangeResourceOnDraw(AdvGraphicInfo graphic, float fadeTime) { Dicing.material = graphic.RenderTextureSetting.GetRenderMaterialIfEnable(Dicing.material); //既に描画されている場合は、クロスフェード用のイメージを作成 bool crossFade = TryCreateCrossFadeImage(fadeTime, graphic); if (!crossFade) { ReleaseCrossFadeReference(); this.RemoveComponent <UguiCrossFadeDicing>(); } DicingTextures dicingTexture = graphic.File.UnityObject as DicingTextures; string pattern = graphic.SubFileName; Dicing.DicingData = dicingTexture; Dicing.ChangePattern(pattern); Dicing.SetNativeSize(); //目パチを設定 SetEyeBlinkSync(graphic.EyeBlinkData); //口パクを設定 SetLipSynch(graphic.LipSynchData); //アニメーションを設定 SetAnimation(graphic.AnimationData); if (!crossFade) { ParentObject.FadeIn(fadeTime, () => { }); } }
internal override void ChangeResourceOnDraw(AdvGraphicInfo graphic, float fadeTime) { patternImage.material = graphic.RenderTextureSetting.GetRenderMaterialIfEnable(patternImage.material); // 既に描画されている場合は、クロスフェード用のイメージを作成. var crossFade = TryCreateCrossFadeImage(patternImage.PatternName, fadeTime, graphic); if (!crossFade) { ReleaseCrossFadeReference(); } patternImage.CrossFade = crossFade; var patternTexture = graphic.File.UnityObject as Modules.PatternTexture.PatternTexture; patternImage.PatternTexture = patternTexture; patternImage.PatternName = graphic.SubFileName; patternImage.SetNativeSize(); if (!crossFade) { ParentObject.FadeIn(fadeTime, () => { }); } }
//********描画時のリソース変更********// internal override void ChangeResourceOnDraw(AdvGraphicInfo graphic, float fadeTime) { //既に描画されている場合は、クロスフェード用のイメージを作成 bool crossFade = TryCreateCrossFadeImage(fadeTime, graphic); if (!crossFade) { ReleaseTemporary(); } //新しくリソースを設定 RawImage.texture = RenderTextureSpace.RenderTexture; RawImage.SetNativeSize(); if (!crossFade && LastResource == null) { ParentObject.FadeIn(fadeTime, () => { }); } }
//********描画時のリソース変更********// internal override void ChangeResourceOnDraw(AdvGraphicInfo graphic, float fadeTime) { Material = graphic.RenderTextureSetting.GetRenderMaterialIfEnable(Material); //既に描画されている場合は、クロスフェード用のイメージを作成 bool crossFade = TryCreateCrossFadeImage(fadeTime, graphic); if (!crossFade) { ReleaseCrossFadeReference(); } //新しくリソースを設定 RawImage.texture = graphic.File.Texture; RawImage.SetNativeSize(); if (!crossFade) { ParentObject.FadeIn(fadeTime); } }
//********描画時のリソース変更********// internal override void ChangeResourceOnDraw(AdvGraphicInfo graphic, float fadeTime) { //既に描画されている場合は、クロスフェード用のイメージを作成 bool crossFade = TryCreateCrossFadeImage(fadeTime, graphic); if (!crossFade) { ReleaseTemporary(); } //新しくリソースを設定 RawImage.texture = RenderTextureSpace.RenderTexture; var setting = RenderTextureSpace.Setting; RawImage.rectTransform.SetWidth(setting.RenderTextureSize.x / setting.RenderTextureScale); RawImage.rectTransform.SetHeight(setting.RenderTextureSize.y / setting.RenderTextureScale); if (!crossFade && LastResource == null) { ParentObject.FadeIn(fadeTime); } }