Class GameSaveSystem | Project Tiny | 0.31.0-preview.24
docs.unity3d.com
    Show / Hide Table of Contents

    Class GameSaveSystem

    Inheritance
    Object
    ComponentSystemBase
    SystemBase
    GameSaveSystem
    Inherited Members
    SystemBase.CompleteDependency()
    SystemBase.Update()
    SystemBase.GetComponent<T>(Entity)
    SystemBase.SetComponent<T>(Entity, T)
    SystemBase.HasComponent<T>(Entity)
    SystemBase.GetComponentDataFromEntity<T>(Boolean)
    SystemBase.GetBuffer<T>(Entity)
    SystemBase.GetBufferFromEntity<T>(Boolean)
    SystemBase.Dependency
    SystemBase.Entities
    SystemBase.Job
    ComponentSystemBase.OnCreateForCompiler()
    ComponentSystemBase.OnStartRunning()
    ComponentSystemBase.OnStopRunning()
    ComponentSystemBase.ShouldRunSystem()
    ComponentSystemBase.GetComponentTypeHandle<T>(Boolean)
    ComponentSystemBase.GetDynamicComponentTypeHandle(ComponentType)
    ComponentSystemBase.GetBufferTypeHandle<T>(Boolean)
    ComponentSystemBase.GetSharedComponentTypeHandle<T>()
    ComponentSystemBase.GetEntityTypeHandle()
    ComponentSystemBase.RequireForUpdate(EntityQuery)
    ComponentSystemBase.RequireSingletonForUpdate<T>()
    ComponentSystemBase.HasSingleton<T>()
    ComponentSystemBase.GetSingleton<T>()
    ComponentSystemBase.SetSingleton<T>(T)
    ComponentSystemBase.GetSingletonEntity<T>()
    ComponentSystemBase.GetEntityQuery(ComponentType[])
    ComponentSystemBase.GetEntityQuery(NativeArray<ComponentType>)
    ComponentSystemBase.GetEntityQuery(EntityQueryDesc[])
    Unity.Entities.ComponentSystemBase.GetArchetypeChunkComponentType<T>(System.Boolean)
    Unity.Entities.ComponentSystemBase.GetArchetypeChunkComponentTypeDynamic(Unity.Entities.ComponentType)
    Unity.Entities.ComponentSystemBase.GetArchetypeChunkBufferType<T>(System.Boolean)
    Unity.Entities.ComponentSystemBase.GetArchetypeChunkSharedComponentType<T>()
    Unity.Entities.ComponentSystemBase.GetArchetypeChunkEntityType()
    ComponentSystemBase.Enabled
    ComponentSystemBase.EntityQueries
    ComponentSystemBase.GlobalSystemVersion
    ComponentSystemBase.LastSystemVersion
    ComponentSystemBase.EntityManager
    ComponentSystemBase.World
    ComponentSystemBase.Time
    ComponentSystemBase.ExecutingSystemType
    Namespace: Unity.Tiny.GameSave
    Syntax
    public class GameSaveSystem : SystemBase

    Properties

    GameSaveIndex

    Declaration
    public int GameSaveIndex { get; set; }
    Property Value
    Type Description
    Int32

    NativeBytesAllocated

    Declaration
    public int NativeBytesAllocated { get; }
    Property Value
    Type Description
    Int32

    Methods

    GetKeys<T>()

    Declaration
    public NativeList<FixedString64> GetKeys<T>()
        where T : IComponentData
    Returns
    Type Description
    NativeList<FixedString64>
    Type Parameters
    Name Description
    T

    GetNumElements(FixedString64)

    Declaration
    public int GetNumElements(FixedString64 key)
    Parameters
    Type Name Description
    FixedString64 key
    Returns
    Type Description
    Int32

    GetSize(FixedString64)

    Declaration
    public int GetSize(FixedString64 key)
    Parameters
    Type Name Description
    FixedString64 key
    Returns
    Type Description
    Int32

    GetType(FixedString64)

    Declaration
    public GameSaveType GetType(FixedString64 key)
    Parameters
    Type Name Description
    FixedString64 key
    Returns
    Type Description
    GameSaveType

    OnCreate()

    Declaration
    protected override void OnCreate()
    Overrides
    ComponentSystemBase.OnCreate()

    OnDestroy()

    Declaration
    protected override void OnDestroy()
    Overrides
    ComponentSystemBase.OnDestroy()

    OnUpdate()

    Declaration
    protected override void OnUpdate()
    Overrides
    SystemBase.OnUpdate()

    Read<T>(FixedString64, ref T)

    Declaration
    public GameSaveResult Read<T>(FixedString64 key, ref T value)
        where T : struct
    Parameters
    Type Name Description
    FixedString64 key
    T value
    Returns
    Type Description
    GameSaveResult
    Type Parameters
    Name Description
    T

    Read<T>(FixedString64, ref T, T)

    Declaration
    public GameSaveResult Read<T>(FixedString64 key, ref T value, in T defaultValue)
        where T : struct
    Parameters
    Type Name Description
    FixedString64 key
    T value
    T defaultValue
    Returns
    Type Description
    GameSaveResult
    Type Parameters
    Name Description
    T

    ReadBool(FixedString64, ref Boolean)

    Declaration
    public GameSaveResult ReadBool(FixedString64 key, ref bool value)
    Parameters
    Type Name Description
    FixedString64 key
    Boolean value
    Returns
    Type Description
    GameSaveResult

    ReadBool(FixedString64, out Boolean, Boolean)

    Declaration
    public GameSaveResult ReadBool(FixedString64 key, out bool value, bool defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    Boolean value
    Boolean defaultValue
    Returns
    Type Description
    GameSaveResult

    ReadByte(FixedString64, ref Byte)

    Declaration
    public GameSaveResult ReadByte(FixedString64 key, ref byte value)
    Parameters
    Type Name Description
    FixedString64 key
    Byte value
    Returns
    Type Description
    GameSaveResult

    ReadByte(FixedString64, out Byte, Byte)

    Declaration
    public GameSaveResult ReadByte(FixedString64 key, out byte value, byte defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    Byte value
    Byte defaultValue
    Returns
    Type Description
    GameSaveResult

    ReadBytes(FixedString64, Void*, Int32)

    Declaration
    public GameSaveResult ReadBytes(FixedString64 key, void *data, int length)
    Parameters
    Type Name Description
    FixedString64 key
    Void* data
    Int32 length
    Returns
    Type Description
    GameSaveResult

    ReadChar(FixedString64, ref Char)

    Declaration
    public GameSaveResult ReadChar(FixedString64 key, ref char value)
    Parameters
    Type Name Description
    FixedString64 key
    Char value
    Returns
    Type Description
    GameSaveResult

    ReadChar(FixedString64, out Char, Char)

    Declaration
    public GameSaveResult ReadChar(FixedString64 key, out char value, char defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    Char value
    Char defaultValue
    Returns
    Type Description
    GameSaveResult

    ReadComponent<T>(FixedString64, ref T)

    Declaration
    public GameSaveResult ReadComponent<T>(FixedString64 key, ref T value)
        where T : struct, IComponentData
    Parameters
    Type Name Description
    FixedString64 key
    T value
    Returns
    Type Description
    GameSaveResult
    Type Parameters
    Name Description
    T

    ReadComponent<T>(FixedString64, out T, T)

    Declaration
    public GameSaveResult ReadComponent<T>(FixedString64 key, out T value, in T defaultValue)
        where T : struct, IComponentData
    Parameters
    Type Name Description
    FixedString64 key
    T value
    T defaultValue
    Returns
    Type Description
    GameSaveResult
    Type Parameters
    Name Description
    T

    ReadDouble(FixedString64, ref Double)

    Declaration
    public GameSaveResult ReadDouble(FixedString64 key, ref double value)
    Parameters
    Type Name Description
    FixedString64 key
    Double value
    Returns
    Type Description
    GameSaveResult

    ReadDouble(FixedString64, out Double, Double)

    Declaration
    public GameSaveResult ReadDouble(FixedString64 key, out double value, double defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    Double value
    Double defaultValue
    Returns
    Type Description
    GameSaveResult

    ReadDynamicBuffer<T>(FixedString64, ref DynamicBuffer<T>)

    Declaration
    public GameSaveResult ReadDynamicBuffer<T>(FixedString64 key, ref DynamicBuffer<T> value)
        where T : struct
    Parameters
    Type Name Description
    FixedString64 key
    DynamicBuffer<T> value
    Returns
    Type Description
    GameSaveResult
    Type Parameters
    Name Description
    T

    ReadFixedString128(FixedString64, ref FixedString128)

    Declaration
    public GameSaveResult ReadFixedString128(FixedString64 key, ref FixedString128 value)
    Parameters
    Type Name Description
    FixedString64 key
    FixedString128 value
    Returns
    Type Description
    GameSaveResult

    ReadFixedString128(FixedString64, out FixedString128, FixedString128)

    Declaration
    public GameSaveResult ReadFixedString128(FixedString64 key, out FixedString128 value, in FixedString128 defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    FixedString128 value
    FixedString128 defaultValue
    Returns
    Type Description
    GameSaveResult

    ReadFixedString64(FixedString64, ref FixedString64)

    Declaration
    public GameSaveResult ReadFixedString64(FixedString64 key, ref FixedString64 value)
    Parameters
    Type Name Description
    FixedString64 key
    FixedString64 value
    Returns
    Type Description
    GameSaveResult

    ReadFixedString64(FixedString64, out FixedString64, FixedString64)

    Declaration
    public GameSaveResult ReadFixedString64(FixedString64 key, out FixedString64 value, in FixedString64 defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    FixedString64 value
    FixedString64 defaultValue
    Returns
    Type Description
    GameSaveResult

    ReadFloat(FixedString64, ref Single)

    Declaration
    public GameSaveResult ReadFloat(FixedString64 key, ref float value)
    Parameters
    Type Name Description
    FixedString64 key
    Single value
    Returns
    Type Description
    GameSaveResult

    ReadFloat(FixedString64, out Single, Single)

    Declaration
    public GameSaveResult ReadFloat(FixedString64 key, out float value, float defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    Single value
    Single defaultValue
    Returns
    Type Description
    GameSaveResult

    ReadInt(FixedString64, ref Int32)

    Declaration
    public GameSaveResult ReadInt(FixedString64 key, ref int value)
    Parameters
    Type Name Description
    FixedString64 key
    Int32 value
    Returns
    Type Description
    GameSaveResult

    ReadInt(FixedString64, out Int32, Int32)

    Declaration
    public GameSaveResult ReadInt(FixedString64 key, out int value, int defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    Int32 value
    Int32 defaultValue
    Returns
    Type Description
    GameSaveResult

    ReadLong(FixedString64, ref Int64)

    Declaration
    public GameSaveResult ReadLong(FixedString64 key, ref long value)
    Parameters
    Type Name Description
    FixedString64 key
    Int64 value
    Returns
    Type Description
    GameSaveResult

    ReadLong(FixedString64, out Int64, Int64)

    Declaration
    public GameSaveResult ReadLong(FixedString64 key, out long value, long defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    Int64 value
    Int64 defaultValue
    Returns
    Type Description
    GameSaveResult

    ReadNativeArray<T>(FixedString64, ref NativeArray<T>, Allocator)

    Declaration
    public GameSaveResult ReadNativeArray<T>(FixedString64 key, ref NativeArray<T> value, Allocator allocator = Allocator.Persistent)
        where T : struct
    Parameters
    Type Name Description
    FixedString64 key
    NativeArray<T> value
    Allocator allocator
    Returns
    Type Description
    GameSaveResult
    Type Parameters
    Name Description
    T

    ReadSbyte(FixedString64, ref SByte)

    Declaration
    public GameSaveResult ReadSbyte(FixedString64 key, ref sbyte value)
    Parameters
    Type Name Description
    FixedString64 key
    SByte value
    Returns
    Type Description
    GameSaveResult

    ReadSbyte(FixedString64, out SByte, SByte)

    Declaration
    public GameSaveResult ReadSbyte(FixedString64 key, out sbyte value, sbyte defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    SByte value
    SByte defaultValue
    Returns
    Type Description
    GameSaveResult

    ReadShort(FixedString64, ref Int16)

    Declaration
    public GameSaveResult ReadShort(FixedString64 key, ref short value)
    Parameters
    Type Name Description
    FixedString64 key
    Int16 value
    Returns
    Type Description
    GameSaveResult

    ReadShort(FixedString64, out Int16, Int16)

    Declaration
    public GameSaveResult ReadShort(FixedString64 key, out short value, short defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    Int16 value
    Int16 defaultValue
    Returns
    Type Description
    GameSaveResult

    ReadUint(FixedString64, ref UInt32)

    Declaration
    public GameSaveResult ReadUint(FixedString64 key, ref uint value)
    Parameters
    Type Name Description
    FixedString64 key
    UInt32 value
    Returns
    Type Description
    GameSaveResult

    ReadUint(FixedString64, out UInt32, UInt32)

    Declaration
    public GameSaveResult ReadUint(FixedString64 key, out uint value, uint defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    UInt32 value
    UInt32 defaultValue
    Returns
    Type Description
    GameSaveResult

    ReadUlong(FixedString64, ref UInt64)

    Declaration
    public GameSaveResult ReadUlong(FixedString64 key, ref ulong value)
    Parameters
    Type Name Description
    FixedString64 key
    UInt64 value
    Returns
    Type Description
    GameSaveResult

    ReadUlong(FixedString64, out UInt64, UInt64)

    Declaration
    public GameSaveResult ReadUlong(FixedString64 key, out ulong value, ulong defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    UInt64 value
    UInt64 defaultValue
    Returns
    Type Description
    GameSaveResult

    ReadUshort(FixedString64, ref UInt16)

    Declaration
    public GameSaveResult ReadUshort(FixedString64 key, ref ushort value)
    Parameters
    Type Name Description
    FixedString64 key
    UInt16 value
    Returns
    Type Description
    GameSaveResult

    ReadUshort(FixedString64, out UInt16, UInt16)

    Declaration
    public GameSaveResult ReadUshort(FixedString64 key, out ushort value, ushort defaultValue)
    Parameters
    Type Name Description
    FixedString64 key
    UInt16 value
    UInt16 defaultValue
    Returns
    Type Description
    GameSaveResult

    RemoveData(FixedString64)

    Declaration
    public void RemoveData(FixedString64 key)
    Parameters
    Type Name Description
    FixedString64 key

    RemoveGameSaveDataFromMemory(Int32)

    Declaration
    public void RemoveGameSaveDataFromMemory(int gameSaveIndex = 0)
    Parameters
    Type Name Description
    Int32 gameSaveIndex

    Write<T>(FixedString64, T)

    Declaration
    public GameSaveResult Write<T>(FixedString64 key, T value)
        where T : struct
    Parameters
    Type Name Description
    FixedString64 key
    T value
    Returns
    Type Description
    GameSaveResult
    Type Parameters
    Name Description
    T

    WriteBool(FixedString64, Boolean)

    Declaration
    public void WriteBool(FixedString64 key, bool value)
    Parameters
    Type Name Description
    FixedString64 key
    Boolean value

    WriteByte(FixedString64, Byte)

    Declaration
    public void WriteByte(FixedString64 key, byte value)
    Parameters
    Type Name Description
    FixedString64 key
    Byte value

    WriteBytes(FixedString64, Void*, Int32)

    Declaration
    public void WriteBytes(FixedString64 key, void *data, int length)
    Parameters
    Type Name Description
    FixedString64 key
    Void* data
    Int32 length

    WriteChar(FixedString64, Char)

    Declaration
    public void WriteChar(FixedString64 key, char value)
    Parameters
    Type Name Description
    FixedString64 key
    Char value

    WriteComponent<T>(FixedString64, ref T)

    Declaration
    public void WriteComponent<T>(FixedString64 key, ref T value)
        where T : struct, IComponentData
    Parameters
    Type Name Description
    FixedString64 key
    T value
    Type Parameters
    Name Description
    T

    WriteDouble(FixedString64, Double)

    Declaration
    public void WriteDouble(FixedString64 key, double value)
    Parameters
    Type Name Description
    FixedString64 key
    Double value

    WriteDynamicBuffer<T>(FixedString64, ref DynamicBuffer<T>)

    Declaration
    public void WriteDynamicBuffer<T>(FixedString64 key, ref DynamicBuffer<T> value)
        where T : struct
    Parameters
    Type Name Description
    FixedString64 key
    DynamicBuffer<T> value
    Type Parameters
    Name Description
    T

    WriteFixedString128(FixedString64, FixedString128)

    Declaration
    public void WriteFixedString128(FixedString64 key, FixedString128 value)
    Parameters
    Type Name Description
    FixedString64 key
    FixedString128 value

    WriteFixedString64(FixedString64, FixedString64)

    Declaration
    public void WriteFixedString64(FixedString64 key, FixedString64 value)
    Parameters
    Type Name Description
    FixedString64 key
    FixedString64 value

    WriteFloat(FixedString64, Single)

    Declaration
    public void WriteFloat(FixedString64 key, float value)
    Parameters
    Type Name Description
    FixedString64 key
    Single value

    WriteInt(FixedString64, Int32)

    Declaration
    public void WriteInt(FixedString64 key, int value)
    Parameters
    Type Name Description
    FixedString64 key
    Int32 value

    WriteLong(FixedString64, Int64)

    Declaration
    public void WriteLong(FixedString64 key, long value)
    Parameters
    Type Name Description
    FixedString64 key
    Int64 value

    WriteNativeArray<T>(FixedString64, ref NativeArray<T>)

    Declaration
    public void WriteNativeArray<T>(FixedString64 key, ref NativeArray<T> value)
        where T : struct
    Parameters
    Type Name Description
    FixedString64 key
    NativeArray<T> value
    Type Parameters
    Name Description
    T

    WriteSbyte(FixedString64, SByte)

    Declaration
    public void WriteSbyte(FixedString64 key, sbyte value)
    Parameters
    Type Name Description
    FixedString64 key
    SByte value

    WriteShort(FixedString64, Int16)

    Declaration
    public void WriteShort(FixedString64 key, short value)
    Parameters
    Type Name Description
    FixedString64 key
    Int16 value

    WriteUint(FixedString64, UInt32)

    Declaration
    public void WriteUint(FixedString64 key, uint value)
    Parameters
    Type Name Description
    FixedString64 key
    UInt32 value

    WriteUlong(FixedString64, UInt64)

    Declaration
    public void WriteUlong(FixedString64 key, ulong value)
    Parameters
    Type Name Description
    FixedString64 key
    UInt64 value

    WriteUshort(FixedString64, UInt16)

    Declaration
    public void WriteUshort(FixedString64 key, ushort value)
    Parameters
    Type Name Description
    FixedString64 key
    UInt16 value
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023