Version: 2023.2

Stage.GetHashForStateStorage

切换到手册
protected Hash128 GetHashForStateStorage ();

返回

Hash128 The hash code identifying this stage.

描述

Unity calls this method to get a hash code that is used to save the state of the Stage to disk.

The state includes Scene view settings and the Camera position. Some Stage types may store additional state data such as the scroll position in the Hierarchy window. Saving the state ensures that, if you close a stage and later open it, Scene view settings, the Camera position, and other stored objects are in the same state you left them in when you closed the Stage.

For stages that use the assetPath property, the hash code is by default based on the Asset GUID, meaning the state is saved individually per Asset. For stages that don't use the assetPath property, the hash code is by default shared for all stages of that type. Custom stage types can override this method to use different logic to determine in which way stage state should be reused.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961