gpt4 book ai didi

android - GVR 标线指针在从 Assets 包加载场景时在运行时丢失其着色器

转载 作者:行者123 更新时间:2023-11-29 23:46:13 26 4
gpt4 key购买 nike

我正在使用 Unity3d 2017.3.1f1 为 Android 使用谷歌 VR,我已将我的场景放入 Assets 包中并在运行时加载它。在加载场景时,GVRReticlePointer 对象似乎在 ReticlePointer Material 上松散了它的着色器。十字线指针显示为粉红色并且不起作用。 The reticle pointer appears pink and does work

最佳答案

这是一个已知的错误,着色器和 Assets 包不是 friend 。 https://support.unity3d.com/hc/en-us/articles/208380753-Shaders-are-pink-when-loaded-from-an-AssetBundle

唯一的解决方法是在基础项目上安装着色器,当你加载 Material 时,通过代码找到着色器:

material.shader = Shader yourShader;

https://docs.unity3d.com/ScriptReference/Material-shader.html

关于android - GVR 标线指针在从 Assets 包加载场景时在运行时丢失其着色器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51373399/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com