Creating Cubemaps in Unity3D

时间:2021-02-16 05:23:24

Creating Cubemaps in Unity3D

1、在Editor目录下生成GenerateStaticCubemap.cs。

  Creating Cubemaps in Unity3D

2、编写代码,生成一个继承于ScriptableWizard类。

  Creating Cubemaps in Unity3D

  wizard包含以下成员:

  Creating Cubemaps in Unity3D

  Wizard入口设置如下:

  Creating Cubemaps in Unity3D

3、Wizard回调函数如下:

  Creating Cubemaps in Unity3D

  isValid忏悔控制Create按钮是否可点。

  Creating Cubemaps in Unity3D

4、OnWizardUpdate用于控制是isValid值。

  Creating Cubemaps in Unity3D

5、OnWizardCreate用于实现创建Cubemap的功能。

  Creating Cubemaps in Unity3D

参考:

1、file://localhost/Applications/Unity/Unity.app/Contents/Documentation/html/en/ScriptReference/ScriptableWizard.html