기술 자료

Unity Engine

Unity Engine

NewPreviewScene()

Creates a new preview scene.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

public static Scene NewPreviewScene()

Returns

Type

Description

SceneThe new preview scene.

Remarks

A preview scene is an Editor-only scene that isn't displayed in the Hierarchy window. You can use this method for tooling that needs to access GameObjects but where the scene shouldn't be displayed in the Hierarchy. Examples of preview scenes are the preview area in the bottom of the Inspector, and the scene used when editing a prefab in Prefab Mode.
Any object added to a preview scene is only rendered in that scene. You must destroy the preview scene using EditorSceneManager.ClosePreviewScene to prevent leaking scenes.