// Unity C# reference source// Copyright (c) Unity Technologies. For terms of use, see// https://unity3d.com/legal/licenses/Unity_Reference_Only_Licenseusing System;using System.Runtime.InteropServices;using UnityEngine.Scripting;using UnityEngine.Bindings;namespace UnityEngine{// A class you can derive from if you want to create objects that don't need to be attached to game objects.[StructLayout(LayoutKind.Sequential)][RequiredByNativeCode][ExtensionOfNativeClass][NativeClass(null)][NativeHeader("Runtime/Mono/MonoBehaviour.h")]public class ScriptableObject : Object{public ScriptableObject(){CreateScriptableObject(this);}[NativeConditional("ENABLE_MONO")][Obsolete("Use EditorUtility.SetDirty instead")]public extern void SetDirty();// Creates an instance of a scriptable object with /className/.public static ScriptableObject CreateInstance(string className){return CreateScriptableObjectInstanceFromName(className);}// Creates an instance of a scriptable object with /type/.public static ScriptableObject CreateInstance(Type type){return CreateScriptableObjectInstanceFromType(type, true);}// Creates an instance of a scriptable object with /T/.public static T CreateInstance<T>() where T : ScriptableObject{return (T)CreateInstance(typeof(T));}[NativeMethod(IsThreadSafe = true)]extern static void CreateScriptableObject([Writable] ScriptableObject self);[FreeFunction("Scripting::CreateScriptableObject")]extern static ScriptableObject CreateScriptableObjectInstanceFromName(string className);[FreeFunction("Scripting::CreateScriptableObjectWithType")]extern internal static ScriptableObject CreateScriptableObjectInstanceFromType(Type type, bool applyDefaultsAndReset);[FreeFunction("Scripting::ResetAndApplyDefaultInstances")]extern internal static void ResetAndApplyDefaultInstances(Object obj);}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。