You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
687 B
21 lines
687 B
using UnityEngine;
|
|
using UnityEngine.Rendering.PostProcessing;
|
|
|
|
namespace UnityEditor.Rendering.PostProcessing
|
|
{
|
|
internal static class VolumeFactory
|
|
{
|
|
[MenuItem("GameObject/3D Object/Post-process Volume")]
|
|
static void CreateVolume()
|
|
{
|
|
var gameObject = new GameObject("Post-process Volume");
|
|
var collider = gameObject.AddComponent<BoxCollider>();
|
|
collider.size = Vector3.one;
|
|
collider.isTrigger = true;
|
|
gameObject.AddComponent<PostProcessVolume>();
|
|
|
|
Selection.objects = new[] { gameObject };
|
|
EditorApplication.ExecuteMenuItem("GameObject/Move To View");
|
|
}
|
|
}
|
|
}
|