效果图:
打包一个root.assetbundle文件,添加如下脚本:
public class LoadSence : MonoBehaviour
{
public Texture Background;
public Texture loading;
private float time=0;
public string url = null;
private WWW www;
void Awake()
{
//加载路径
if (Application.platform == RuntimePlatform.WindowsEditor)
{
url = "file:///" + Application.dataPath + "/StreamingAssets/WebPlayer/";
}
else if (Application.platform == RuntimePlatform.WindowsWebPlayer)
{
}
}
void Start()
{
StartCoroutine(LoadSenceAssetbundle());
}
void FixedUpdate()
{
time += Time.deltaTime;
}
void OnGUI()
{
if (www != null)

本文通过一个实例展示了如何在Unity中使用GUI系统来绘制并旋转纹理。内容包括创建root.assetbundle文件以及添加用于旋转纹理的脚本,最终达到预期的动态视觉效果。
最低0.47元/天 解锁文章
770

被折叠的 条评论
为什么被折叠?



