├── .gitignore ├── Assets ├── Runtime.meta ├── Runtime │ ├── Encrypt.asmdef │ ├── Encrypt.asmdef.meta │ ├── EncryptByte.cs │ ├── EncryptByte.cs.meta │ ├── EncryptDouble.cs │ ├── EncryptDouble.cs.meta │ ├── EncryptFloat.cs │ ├── EncryptFloat.cs.meta │ ├── EncryptInt.cs │ ├── EncryptInt.cs.meta │ ├── EncryptLong.cs │ ├── EncryptLong.cs.meta │ ├── EncryptSByte.cs │ ├── EncryptSByte.cs.meta │ ├── EncryptShort.cs │ ├── EncryptShort.cs.meta │ ├── EncryptUInt.cs │ ├── EncryptUInt.cs.meta │ ├── EncryptULong.cs │ ├── EncryptULong.cs.meta │ ├── EncryptUShort.cs │ └── EncryptUShort.cs.meta ├── Tests.meta ├── Tests │ ├── Encrypt.Tests.asmdef │ ├── Encrypt.Tests.asmdef.meta │ ├── EncryptByteTest.cs │ ├── EncryptByteTest.cs.meta │ ├── EncryptDoubleTest.cs │ ├── EncryptDoubleTest.cs.meta │ ├── EncryptFloatTest.cs │ ├── EncryptFloatTest.cs.meta │ ├── EncryptIntTest.cs │ ├── EncryptIntTest.cs.meta │ ├── EncryptLongTest.cs │ ├── EncryptLongTest.cs.meta │ ├── EncryptSByteTest.cs │ ├── EncryptSByteTest.cs.meta │ ├── EncryptShort.cs │ ├── EncryptShort.cs.meta │ ├── EncryptUIntTest.cs │ ├── EncryptUIntTest.cs.meta │ ├── EncryptULongTest.cs │ ├── EncryptULongTest.cs.meta │ ├── EncryptUShortTest.cs │ ├── EncryptUShortTest.cs.meta │ ├── Performance.meta │ └── Performance │ │ ├── EncryptBytePerformance.cs │ │ ├── EncryptBytePerformance.cs.meta │ │ ├── EncryptDoublePerformance.cs │ │ ├── EncryptDoublePerformance.cs.meta │ │ ├── EncryptFloatPerformance.cs │ │ ├── EncryptFloatPerformance.cs.meta │ │ ├── EncryptIntPerformance.cs │ │ ├── EncryptIntPerformance.cs.meta │ │ ├── EncryptLongPerformance.cs │ │ ├── EncryptLongPerformance.cs.meta │ │ ├── EncryptSBytePerformance.cs │ │ ├── EncryptSBytePerformance.cs.meta │ │ ├── EncryptShortPerformance.cs │ │ ├── EncryptShortPerformance.cs.meta │ │ ├── EncryptUIntPerformance.cs │ │ ├── EncryptUIntPerformance.cs.meta │ │ ├── EncryptULongPerformance.cs │ │ ├── EncryptULongPerformance.cs.meta │ │ ├── EncryptUShortPerformance.cs │ │ └── EncryptUShortPerformance.cs.meta ├── package.json └── package.json.meta ├── LICENSE ├── Packages ├── manifest.json └── packages-lock.json ├── Pic └── EncryptLong_Benchmark.png ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── MemorySettings.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset ├── XRSettings.asset └── boot.config └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *node_modules/ 2 | *node_modules.meta 3 | *.csproj 4 | *.idea 5 | Assets/Scenes/ 6 | Assets/Scenes.meta 7 | *.DS_Store 8 | Assets/*Plugins/ 9 | Assets/*Plugins.meta 10 | 11 | Assets/Editor/Config/ 12 | Assets/AddressableAssetsData/ 13 | Assets/Editor/Config.meta 14 | Assets/AddressableAssetsData.meta 15 | Assets/Editor/OdinToolsEditor/OdinToolkit.cs 16 | Assets/Editor/OdinToolsEditor/OdinToolkit.cs.meta 17 | 18 | # This .gitignore file should be placed at the root of your Unity project directory 19 | # 20 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 21 | # 22 | /[Ll]ibrary/ 23 | /[Tt]emp/ 24 | /[Oo]bj/ 25 | /[Bb]uild/ 26 | /[Bb]uilds/ 27 | /[Ll]ogs/ 28 | /[Uu]ser[Ss]ettings/ 29 | 30 | # MemoryCaptures can get excessive in size. 31 | # They also could contain extremely sensitive data 32 | /[Mm]emoryCaptures/ 33 | 34 | # Uncomment this line if you wish to ignore the asset store tools plugin 35 | # /[Aa]ssets/AssetStoreTools* 36 | 37 | # Autogenerated Jetbrains Rider plugin 38 | /[Aa]ssets/Plugins/Editor/JetBrains* 39 | 40 | # Visual Studio cache directory 41 | .vs/ 42 | 43 | # Gradle cache directory 44 | .gradle/ 45 | 46 | # Autogenerated VS/MD/Consulo solution and project files 47 | ExportedObj/ 48 | .consulo/ 49 | *.csproj 50 | *.unityproj 51 | *.sln 52 | *.suo 53 | *.tmp 54 | *.user 55 | *.userprefs 56 | *.pidb 57 | *.booproj 58 | *.svd 59 | *.pdb 60 | *.mdb 61 | *.opendb 62 | *.VC.db 63 | 64 | # Unity3D generated meta files 65 | *.pidb.meta 66 | *.pdb.meta 67 | *.mdb.meta 68 | 69 | # Unity3D generated file on crash reports 70 | sysinfo.txt 71 | 72 | # Builds 73 | *.apk 74 | *.aab 75 | *.unitypackage 76 | 77 | # Crashlytics generated file 78 | crashlytics-build.properties 79 | 80 | # Packed Addressables 81 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 82 | 83 | # Temporary auto-generated Android Assets 84 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 85 | /[Aa]ssets/[Ss]treamingAssets/aa/* 86 | 87 | Assets/Resources/ 88 | 89 | Assets/Editor/Third/UGUI-Editor/Res/Preview/*.png 90 | Assets/Editor/Third/UGUI-Editor/Res/Preview/*.png.meta 91 | mono_crash*.json 92 | *.unitypackage.meta 93 | Assets/package-lock.json 94 | Assets/package-lock.json.meta 95 | 96 | Assets/Resources.meta 97 | 98 | Assets/FR2_Cache.asset 99 | 100 | Assets/FR2_Cache.asset.meta 101 | 102 | ProjectSettings/RiderScriptEditorPersistedState.asset 103 | -------------------------------------------------------------------------------- /Assets/Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62dfb778e8acf4df2a4adf73a7170913 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Runtime/Encrypt.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Encrypt", 3 | "rootNamespace": "Encrypt", 4 | "references": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": true, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": true, 11 | "defineConstraints": [], 12 | "versionDefines": [], 13 | "noEngineReferences": false 14 | } -------------------------------------------------------------------------------- /Assets/Runtime/Encrypt.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 823055932b100432e824bd57873c19eb 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Runtime/EncryptByte.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace Encrypt 5 | { 6 | public struct EncryptByte : IComparable, IEquatable 7 | { 8 | private static readonly Random _RANDOM = new(); 9 | private static readonly byte _KEY = (byte) _RANDOM.Next(1, Int32.MaxValue); 10 | 11 | private byte _0; 12 | private byte _1; 13 | private byte _2; 14 | 15 | private byte _index; 16 | 17 | private EncryptByte(byte value) 18 | { 19 | _0 = _1 = _2 = 0; 20 | 21 | _index = (byte) _RANDOM.Next(0, 3); 22 | 23 | Set(value); 24 | } 25 | 26 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 27 | public unsafe byte Get() 28 | { 29 | fixed(EncryptByte* array = &this) 30 | { 31 | return(byte) (((byte*) array)[_index] ^ _KEY); 32 | } 33 | } 34 | 35 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 36 | public unsafe void Set(byte value) 37 | { 38 | if(++_index == 3) 39 | { 40 | _index = 0; 41 | } 42 | 43 | fixed(EncryptByte* array = &this) 44 | { 45 | ((byte*) array)[_index] = (byte) (value ^ _KEY); 46 | } 47 | } 48 | 49 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 50 | public void Add(byte value) { Set((byte) (Get() + value)); } 51 | 52 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 53 | public void Remove(byte value) { Set((byte) (Get() - value)); } 54 | 55 | public int CompareTo(EncryptByte other) => Get().CompareTo(other.Get()); 56 | 57 | public bool Equals(EncryptByte other) => Get() == other.Get(); 58 | 59 | public override bool Equals(object obj) => obj is EncryptInt other && Equals(other); 60 | 61 | public override int GetHashCode() => Get(); 62 | 63 | public override string ToString() => Get().ToString(); 64 | 65 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 66 | public static implicit operator EncryptByte(byte value) { return new EncryptByte(value); } 67 | 68 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 69 | public static implicit operator byte(EncryptByte d) { return d.Equals(null) ? default : d.Get(); } 70 | } 71 | } -------------------------------------------------------------------------------- /Assets/Runtime/EncryptByte.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1748d8144d54b548adb5689d03b59c8 3 | timeCreated: 1663556432 -------------------------------------------------------------------------------- /Assets/Runtime/EncryptDouble.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Runtime.CompilerServices; 4 | 5 | namespace Encrypt 6 | { 7 | public struct EncryptDouble : IComparable, IEquatable 8 | { 9 | private static readonly Random _RANDOM = new(); 10 | 11 | private static readonly ulong _KEY = (ulong) _RANDOM.Next(1, int.MaxValue); 12 | 13 | private ulong _0; 14 | private ulong _1; 15 | private ulong _2; 16 | 17 | private byte _index; 18 | 19 | private EncryptDouble(double value) 20 | { 21 | _0 = _1 = _2 = 0; 22 | 23 | _index = (byte) _RANDOM.Next(0, 3); 24 | 25 | Set(value); 26 | } 27 | 28 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 29 | public unsafe double Get() 30 | { 31 | fixed(EncryptDouble* array = &this) 32 | { 33 | var value = ((ulong*) array)[_index] ^ _KEY; 34 | var bytes = BitConverter.GetBytes(value); 35 | return BitConverter.ToDouble(bytes); 36 | } 37 | } 38 | 39 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 40 | public unsafe void Set(double value) 41 | { 42 | if(++_index == 3) 43 | { 44 | _index = 0; 45 | } 46 | 47 | fixed(EncryptDouble* array = &this) 48 | { 49 | var bytes = BitConverter.GetBytes(value); 50 | ulong encrypt = BitConverter.ToUInt64(bytes, 0); 51 | ((ulong*) array)[_index] = encrypt ^ _KEY; 52 | } 53 | } 54 | 55 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 56 | public void Add(double value) { Set(Get() + value); } 57 | 58 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 59 | public void Remove(double value) { Set(Get() - value); } 60 | 61 | public int CompareTo(EncryptDouble other) => Get().CompareTo(other.Get()); 62 | 63 | public bool Equals(EncryptDouble other) => Math.Abs(Get() - other.Get()) < Double.Epsilon; 64 | 65 | public override bool Equals(object obj) => obj is EncryptDouble other && Equals(other); 66 | 67 | public override int GetHashCode() => Get().GetHashCode(); 68 | 69 | public override string ToString() => Get().ToString(CultureInfo.InvariantCulture); 70 | 71 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 72 | public static implicit operator EncryptDouble(int value) { return new EncryptDouble(value); } 73 | 74 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 75 | public static implicit operator double(EncryptDouble d) { return d.Equals(null) ? 0 : d.Get(); } 76 | } 77 | } -------------------------------------------------------------------------------- /Assets/Runtime/EncryptDouble.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55290936ad5e4f3ca019161a3bb8b1c5 3 | timeCreated: 1663560528 -------------------------------------------------------------------------------- /Assets/Runtime/EncryptFloat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Runtime.CompilerServices; 4 | 5 | namespace Encrypt 6 | { 7 | public struct EncryptFloat : IComparable, IEquatable 8 | { 9 | private static readonly Random _RANDOM = new(); 10 | private static readonly uint _KEY = (uint) _RANDOM.Next(1, int.MaxValue); 11 | 12 | private uint _0; 13 | private uint _1; 14 | private uint _2; 15 | 16 | private byte _index; 17 | 18 | private EncryptFloat(float value) 19 | { 20 | _0 = _1 = _2 = 0; 21 | 22 | _index = (byte) _RANDOM.Next(0, 3); 23 | 24 | Set(value); 25 | } 26 | 27 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 28 | public unsafe float Get() 29 | { 30 | fixed(EncryptFloat* array = &this) 31 | { 32 | uint value = ((uint*) array)[_index] ^ _KEY; 33 | 34 | var bytes = BitConverter.GetBytes(value); 35 | return BitConverter.ToSingle(bytes, 0); 36 | } 37 | } 38 | 39 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 40 | public unsafe void Set(float value) 41 | { 42 | if(++_index == 3) 43 | { 44 | _index = 0; 45 | } 46 | 47 | fixed(EncryptFloat* array = &this) 48 | { 49 | var bytes = BitConverter.GetBytes(value); 50 | var encrypt = BitConverter.ToUInt32(bytes, 0) ^ _KEY; 51 | ((uint*) array)[_index] = encrypt; 52 | } 53 | } 54 | 55 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 56 | public void Add(float value) { Set(Get() + value); } 57 | 58 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 59 | public void Remove(float value) { Set(Get() - value); } 60 | 61 | public int CompareTo(EncryptFloat other) => Get().CompareTo(other.Get()); 62 | 63 | public bool Equals(EncryptFloat other) => Math.Abs(Get() - other.Get()) < float.Epsilon; 64 | 65 | public override bool Equals(object obj) => obj is EncryptFloat other && Equals(other); 66 | 67 | public override int GetHashCode() => Get().GetHashCode(); 68 | 69 | public override string ToString() => Get().ToString(CultureInfo.InvariantCulture); 70 | 71 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 72 | public static implicit operator EncryptFloat(float value) { return new EncryptFloat(value); } 73 | 74 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 75 | public static implicit operator float(EncryptFloat d) { return d.Equals(null) ? 0 : d.Get(); } 76 | } 77 | } -------------------------------------------------------------------------------- /Assets/Runtime/EncryptFloat.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f52bae4056a64789a8eef6f903c60c38 3 | timeCreated: 1663558398 -------------------------------------------------------------------------------- /Assets/Runtime/EncryptInt.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace Encrypt 5 | { 6 | public struct EncryptInt : IComparable, IEquatable 7 | { 8 | private static readonly Random _RANDOM = new(); 9 | 10 | private static readonly int _KEY = _RANDOM.Next(1, Int32.MaxValue); 11 | 12 | private int _0; 13 | private int _1; 14 | private int _2; 15 | 16 | private byte _index; 17 | 18 | private EncryptInt(int value) 19 | { 20 | _0 = _1 = _2 = 0; 21 | 22 | _index = (byte) _RANDOM.Next(0, 3); 23 | 24 | Set(value); 25 | } 26 | 27 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 28 | public unsafe int Get() 29 | { 30 | fixed(EncryptInt* array = &this) 31 | { 32 | return((int*) array)[_index] ^ _KEY; 33 | } 34 | } 35 | 36 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 37 | public unsafe void Set(int value) 38 | { 39 | if(++_index == 3) 40 | { 41 | _index = 0; 42 | } 43 | 44 | fixed(EncryptInt* array = &this) 45 | { 46 | ((int*) array)[_index] = value ^ _KEY; 47 | } 48 | } 49 | 50 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 51 | public void Add(int value) { Set(Get() + value); } 52 | 53 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 54 | public void Remove(int value) { Set(Get() - value); } 55 | 56 | public int CompareTo(EncryptInt other) => Get().CompareTo(other.Get()); 57 | 58 | public bool Equals(EncryptInt other) => Get() == other.Get(); 59 | 60 | public override bool Equals(object obj) => obj is EncryptInt other && Equals(other); 61 | 62 | public override int GetHashCode() => Get(); 63 | 64 | public override string ToString() => Get().ToString(); 65 | 66 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 67 | public static implicit operator EncryptInt(int value) { return new EncryptInt(value); } 68 | 69 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 70 | public static implicit operator int(EncryptInt d) { return d.Equals(null) ? 0 : d.Get(); } 71 | } 72 | } -------------------------------------------------------------------------------- /Assets/Runtime/EncryptInt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7e08c6989834bae93854cd7549933a9 3 | timeCreated: 1663552369 -------------------------------------------------------------------------------- /Assets/Runtime/EncryptLong.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace Encrypt 5 | { 6 | public struct EncryptLong : IComparable, IEquatable 7 | { 8 | private static readonly Random _RANDOM = new(); 9 | 10 | private static readonly long _KEY = _RANDOM.Next(1, Int32.MaxValue); 11 | 12 | 13 | private long _0; 14 | private long _1; 15 | private long _2; 16 | 17 | private byte _index; 18 | 19 | private EncryptLong(long value) 20 | { 21 | _0 = _1 = _2 = 0; 22 | 23 | _index = (byte) _RANDOM.Next(0, 3); 24 | 25 | Set(value); 26 | } 27 | 28 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 29 | public unsafe long Get() 30 | { 31 | fixed(EncryptLong* array = &this) 32 | { 33 | return((long*) array)[_index] ^ _KEY; 34 | } 35 | } 36 | 37 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 38 | public unsafe void Set(long value) 39 | { 40 | if(++_index == 3) 41 | { 42 | _index = 0; 43 | } 44 | 45 | fixed(EncryptLong* array = &this) 46 | { 47 | ((long*) array)[_index] = value ^ _KEY; 48 | } 49 | } 50 | 51 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 52 | public void Add(long value) { Set(Get() + value); } 53 | 54 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 55 | public void Remove(long value) { Set(Get() - value); } 56 | 57 | public int CompareTo(EncryptLong other) => Get().CompareTo(other.Get()); 58 | 59 | public bool Equals(EncryptLong other) => Get() == other.Get(); 60 | 61 | public override bool Equals(object obj) => obj is EncryptLong other && Equals(other); 62 | 63 | public override int GetHashCode() => Get().GetHashCode(); 64 | 65 | public override string ToString() => Get().ToString(); 66 | 67 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 68 | public static implicit operator EncryptLong(long value) { return new EncryptLong(value); } 69 | 70 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 71 | public static implicit operator long(EncryptLong d) { return d.Equals(null) ? 0 : d.Get(); } 72 | } 73 | } -------------------------------------------------------------------------------- /Assets/Runtime/EncryptLong.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c550953ecfc4464bd19f412570a5af2 3 | timeCreated: 1663557047 -------------------------------------------------------------------------------- /Assets/Runtime/EncryptSByte.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace Encrypt 5 | { 6 | public struct EncryptSByte : IComparable, IEquatable 7 | { 8 | private static readonly Random _RANDOM = new(); 9 | private static readonly sbyte _KEY = (sbyte) _RANDOM.Next(1, sbyte.MaxValue); 10 | 11 | private sbyte _0; 12 | private sbyte _1; 13 | private sbyte _2; 14 | 15 | private byte _index; 16 | 17 | private EncryptSByte(sbyte value) 18 | { 19 | _0 = _1 = _2 = 0; 20 | 21 | _index = (byte) _RANDOM.Next(0, 3); 22 | 23 | Set(value); 24 | } 25 | 26 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 27 | public unsafe sbyte Get() 28 | { 29 | fixed(EncryptSByte* array = &this) 30 | { 31 | return(sbyte) (((sbyte*) array)[_index] ^ _KEY); 32 | } 33 | } 34 | 35 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 36 | public unsafe void Set(sbyte value) 37 | { 38 | if(++_index == 3) 39 | { 40 | _index = 0; 41 | } 42 | 43 | fixed(EncryptSByte* array = &this) 44 | { 45 | ((sbyte*) array)[_index] = (sbyte) (value ^ _KEY); 46 | } 47 | } 48 | 49 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 50 | public void Add(sbyte value) { Set((sbyte) (Get() + value)); } 51 | 52 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 53 | public void Remove(sbyte value) { Set((sbyte) (Get() - value)); } 54 | 55 | public int CompareTo(EncryptSByte other) => Get().CompareTo(other.Get()); 56 | 57 | public bool Equals(EncryptSByte other) => Get() == other.Get(); 58 | 59 | public override bool Equals(object obj) => obj is EncryptInt other && Equals(other); 60 | 61 | public override int GetHashCode() => Get(); 62 | 63 | public override string ToString() => Get().ToString(); 64 | 65 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 66 | public static implicit operator EncryptSByte(sbyte value) { return new EncryptSByte(value); } 67 | 68 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 69 | public static implicit operator sbyte(EncryptSByte d) { return d.Equals(null) ? default : d.Get(); } 70 | } 71 | } -------------------------------------------------------------------------------- /Assets/Runtime/EncryptSByte.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9820d6b4dbfc4a2b8e1b4e788c2fd2c5 3 | timeCreated: 1663749844 -------------------------------------------------------------------------------- /Assets/Runtime/EncryptShort.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace Encrypt 5 | { 6 | public struct EncryptShort : IComparable, IEquatable 7 | { 8 | private static readonly Random _RANDOM = new(); 9 | private static readonly short _KEY = (short) _RANDOM.Next(1, short.MaxValue); 10 | 11 | private short _0; 12 | private short _1; 13 | private short _2; 14 | 15 | private byte _index; 16 | 17 | private EncryptShort(short value) 18 | { 19 | _0 = _1 = _2 = 0; 20 | 21 | _index = (byte) _RANDOM.Next(0, 3); 22 | 23 | Set(value); 24 | } 25 | 26 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 27 | public unsafe short Get() 28 | { 29 | fixed(EncryptShort* array = &this) 30 | { 31 | return(short) (((short*) array)[_index] ^ _KEY); 32 | } 33 | } 34 | 35 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 36 | public unsafe void Set(short value) 37 | { 38 | if(++_index == 3) 39 | { 40 | _index = 0; 41 | } 42 | 43 | fixed(EncryptShort* array = &this) 44 | { 45 | ((short*) array)[_index] = (short) (value ^ _KEY); 46 | } 47 | } 48 | 49 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 50 | public void Add(short value) { Set((short) (Get() + value)); } 51 | 52 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 53 | public void Remove(short value) { Set((short) (Get() - value)); } 54 | 55 | public int CompareTo(EncryptShort other) => Get().CompareTo(other.Get()); 56 | 57 | public bool Equals(EncryptShort other) => Get() == other.Get(); 58 | 59 | public override bool Equals(object obj) => obj is EncryptInt other && Equals(other); 60 | 61 | public override int GetHashCode() => Get(); 62 | 63 | public override string ToString() => Get().ToString(); 64 | 65 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 66 | public static implicit operator EncryptShort(short value) { return new EncryptShort(value); } 67 | 68 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 69 | public static implicit operator short(EncryptShort d) { return d.Equals(null) ? default : d.Get(); } 70 | } 71 | } -------------------------------------------------------------------------------- /Assets/Runtime/EncryptShort.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7054f92d19d2476ead2ca8b089f60556 3 | timeCreated: 1663749652 -------------------------------------------------------------------------------- /Assets/Runtime/EncryptUInt.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace Encrypt 5 | { 6 | public struct EncryptUInt : IComparable, IEquatable 7 | { 8 | private static readonly Random _RANDOM = new(); 9 | 10 | private static readonly uint _KEY = (uint) _RANDOM.Next(1, int.MaxValue); 11 | 12 | private uint _0; 13 | private uint _1; 14 | private uint _2; 15 | 16 | private byte _index; 17 | 18 | private EncryptUInt(uint value) 19 | { 20 | _0 = _1 = _2 = 0; 21 | 22 | _index = (byte) _RANDOM.Next(0, 3); 23 | 24 | Set(value); 25 | } 26 | 27 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 28 | public unsafe uint Get() 29 | { 30 | fixed(EncryptUInt* array = &this) 31 | { 32 | return((uint*) array)[_index] ^ _KEY; 33 | } 34 | } 35 | 36 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 37 | public unsafe void Set(uint value) 38 | { 39 | if(++_index == 3) 40 | { 41 | _index = 0; 42 | } 43 | 44 | fixed(EncryptUInt* array = &this) 45 | { 46 | ((uint*) array)[_index] = value ^ _KEY; 47 | } 48 | } 49 | 50 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 51 | public void Add(uint value) { Set(Get() + value); } 52 | 53 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 54 | public void Remove(uint value) { Set(Get() - value); } 55 | 56 | public int CompareTo(EncryptUInt other) => Get().CompareTo(other.Get()); 57 | 58 | public bool Equals(EncryptUInt other) => Get() == other.Get(); 59 | 60 | public override bool Equals(object obj) => obj is EncryptUInt other && Equals(other); 61 | 62 | public override int GetHashCode() => Get().GetHashCode(); 63 | 64 | public override string ToString() => Get().ToString(); 65 | 66 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 67 | public static implicit operator EncryptUInt(uint value) { return new EncryptUInt(value); } 68 | 69 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 70 | public static implicit operator uint(EncryptUInt d) { return d.Equals(null) ? 0 : d.Get(); } 71 | } 72 | } -------------------------------------------------------------------------------- /Assets/Runtime/EncryptUInt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8970c429644442d6a2afd5a73c1326d9 3 | timeCreated: 1663749980 -------------------------------------------------------------------------------- /Assets/Runtime/EncryptULong.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace Encrypt 5 | { 6 | public struct EncryptULong : IComparable, IEquatable 7 | { 8 | private static readonly Random _RANDOM = new(); 9 | 10 | private static readonly ulong _KEY = (ulong) _RANDOM.Next(1, Int32.MaxValue); 11 | 12 | 13 | private ulong _0; 14 | private ulong _1; 15 | private ulong _2; 16 | 17 | private byte _index; 18 | 19 | private EncryptULong(ulong value) 20 | { 21 | _0 = _1 = _2 = 0; 22 | 23 | _index = (byte) _RANDOM.Next(0, 3); 24 | 25 | Set(value); 26 | } 27 | 28 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 29 | public unsafe ulong Get() 30 | { 31 | fixed(EncryptULong* array = &this) 32 | { 33 | return((ulong*) array)[_index] ^ _KEY; 34 | } 35 | } 36 | 37 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 38 | public unsafe void Set(ulong value) 39 | { 40 | if(++_index == 3) 41 | { 42 | _index = 0; 43 | } 44 | 45 | fixed(EncryptULong* array = &this) 46 | { 47 | ((ulong*) array)[_index] = value ^ _KEY; 48 | } 49 | } 50 | 51 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 52 | public void Add(ulong value) { Set(Get() + value); } 53 | 54 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 55 | public void Remove(ulong value) { Set(Get() - value); } 56 | 57 | public int CompareTo(EncryptULong other) => Get().CompareTo(other.Get()); 58 | 59 | public bool Equals(EncryptULong other) => Get() == other.Get(); 60 | 61 | public override bool Equals(object obj) => obj is EncryptULong other && Equals(other); 62 | 63 | public override int GetHashCode() => Get().GetHashCode(); 64 | 65 | public override string ToString() => Get().ToString(); 66 | 67 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 68 | public static implicit operator EncryptULong(ulong value) { return new EncryptULong(value); } 69 | 70 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 71 | public static implicit operator ulong(EncryptULong d) { return d.Equals(null) ? 0 : d.Get(); } 72 | } 73 | } -------------------------------------------------------------------------------- /Assets/Runtime/EncryptULong.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8f4fdbc4a124139a9477dc9149c00bd 3 | timeCreated: 1663750094 -------------------------------------------------------------------------------- /Assets/Runtime/EncryptUShort.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace Encrypt 5 | { 6 | public struct EncryptUShort : IComparable, IEquatable 7 | { 8 | private static readonly Random _RANDOM = new(); 9 | private static readonly ushort _KEY = (ushort) _RANDOM.Next(1, ushort.MaxValue); 10 | 11 | private ushort _0; 12 | private ushort _1; 13 | private ushort _2; 14 | 15 | private byte _index; 16 | 17 | private EncryptUShort(ushort value) 18 | { 19 | _0 = _1 = _2 = 0; 20 | 21 | _index = (byte) _RANDOM.Next(0, 3); 22 | 23 | Set(value); 24 | } 25 | 26 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 27 | public unsafe ushort Get() 28 | { 29 | fixed(EncryptUShort* array = &this) 30 | { 31 | return(ushort) (((ushort*) array)[_index] ^ _KEY); 32 | } 33 | } 34 | 35 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 36 | public unsafe void Set(ushort value) 37 | { 38 | if(++_index == 3) 39 | { 40 | _index = 0; 41 | } 42 | 43 | fixed(EncryptUShort* array = &this) 44 | { 45 | ((ushort*) array)[_index] = (ushort) (value ^ _KEY); 46 | } 47 | } 48 | 49 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 50 | public void Add(ushort value) { Set((ushort) (Get() + value)); } 51 | 52 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 53 | public void Remove(ushort value) { Set((ushort) (Get() - value)); } 54 | 55 | public int CompareTo(EncryptUShort other) => Get().CompareTo(other.Get()); 56 | 57 | public bool Equals(EncryptUShort other) => Get() == other.Get(); 58 | 59 | public override bool Equals(object obj) => obj is EncryptInt other && Equals(other); 60 | 61 | public override int GetHashCode() => Get(); 62 | 63 | public override string ToString() => Get().ToString(); 64 | 65 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 66 | public static implicit operator EncryptUShort(ushort value) { return new EncryptUShort(value); } 67 | 68 | [MethodImpl(MethodImplOptions.AggressiveInlining)] 69 | public static implicit operator ushort(EncryptUShort d) { return d.Equals(null) ? default : d.Get(); } 70 | } 71 | } -------------------------------------------------------------------------------- /Assets/Runtime/EncryptUShort.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f9e6fea5f1e46bbab3724e75328c2c3 3 | timeCreated: 1663750166 -------------------------------------------------------------------------------- /Assets/Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1aa7cb9ce4b64c268c5270e424be5814 3 | timeCreated: 1663554036 -------------------------------------------------------------------------------- /Assets/Tests/Encrypt.Tests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Encrypt.Tests", 3 | "rootNamespace": "", 4 | "references": [ 5 | "GUID:27619889b8ba8c24980f49ee34dbb44a", 6 | "GUID:823055932b100432e824bd57873c19eb", 7 | "GUID:c0dd0d10738d4ad4a9de57c559d0ca1b" 8 | ], 9 | "includePlatforms": [ 10 | "Editor" 11 | ], 12 | "excludePlatforms": [], 13 | "allowUnsafeCode": false, 14 | "overrideReferences": false, 15 | "precompiledReferences": [], 16 | "autoReferenced": true, 17 | "defineConstraints": [ 18 | "UNITY_INCLUDE_TESTS" 19 | ], 20 | "versionDefines": [], 21 | "noEngineReferences": false 22 | } -------------------------------------------------------------------------------- /Assets/Tests/Encrypt.Tests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78798d73c1e1443ec8bbfe50c5d077f8 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Tests/EncryptByteTest.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | 4 | namespace Tests 5 | { 6 | public class EncryptByteTest 7 | { 8 | [Test] 9 | public void Encrypt2Byte() 10 | { 11 | EncryptByte encrypt = 0; 12 | 13 | Assert.IsTrue(encrypt == 0); 14 | 15 | encrypt.Set(1); 16 | Assert.IsTrue(encrypt == 1); 17 | 18 | encrypt.Set(2); 19 | Assert.IsTrue(encrypt == 2); 20 | 21 | encrypt.Set(3); 22 | Assert.IsTrue(encrypt == 3); 23 | 24 | encrypt.Set(64); 25 | Assert.IsTrue(encrypt == 64); 26 | } 27 | 28 | [Test] 29 | public void Byte2Encrypt() 30 | { 31 | byte value = 0; 32 | EncryptByte encrypt = value; 33 | 34 | Assert.IsTrue(encrypt == value); 35 | } 36 | 37 | [Test] 38 | public void EncryptEquals() 39 | { 40 | EncryptByte one = 0; 41 | EncryptByte other = 0; 42 | 43 | Assert.IsTrue(one == other); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /Assets/Tests/EncryptByteTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0733a6fb2b004a6f83dae77236b183cd 3 | timeCreated: 1663750368 -------------------------------------------------------------------------------- /Assets/Tests/EncryptDoubleTest.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | 4 | namespace Tests 5 | { 6 | public class EncryptDoubleTest 7 | { 8 | [Test] 9 | public void Encrypt2Double() 10 | { 11 | EncryptDouble encrypt = 0; 12 | 13 | Assert.IsTrue(encrypt == 0); 14 | 15 | encrypt.Set(1); 16 | Assert.IsTrue(encrypt == 1); 17 | 18 | encrypt.Set(2); 19 | Assert.IsTrue(encrypt == 2); 20 | 21 | encrypt.Set(3); 22 | Assert.IsTrue(encrypt == 3); 23 | 24 | encrypt.Set(257); 25 | Assert.IsTrue(encrypt == 257); 26 | } 27 | 28 | [Test] 29 | public void Double2Encrypt() 30 | { 31 | int value = 0; 32 | EncryptDouble encrypt = value; 33 | 34 | Assert.IsTrue(encrypt == value); 35 | } 36 | 37 | [Test] 38 | public void EncryptEquals() 39 | { 40 | EncryptDouble one = 0; 41 | EncryptDouble other = 0; 42 | 43 | Assert.IsTrue(one == other); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /Assets/Tests/EncryptDoubleTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c94dfe2a66b744c7bcdd03f8fef974ba 3 | timeCreated: 1663562579 -------------------------------------------------------------------------------- /Assets/Tests/EncryptFloatTest.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | 4 | namespace Tests 5 | { 6 | public class EncryptFloatTest 7 | { 8 | [Test] 9 | public void Encrypt2Float() 10 | { 11 | EncryptFloat encrypt = 0; 12 | 13 | Assert.IsTrue(encrypt == 0); 14 | 15 | encrypt.Set(1); 16 | Assert.IsTrue(encrypt == 1); 17 | 18 | encrypt.Set(2); 19 | Assert.IsTrue(encrypt == 2); 20 | 21 | encrypt.Set(3); 22 | Assert.IsTrue(encrypt == 3); 23 | 24 | encrypt.Set(257); 25 | Assert.IsTrue(encrypt == 257); 26 | } 27 | 28 | [Test] 29 | public void Float2Encrypt() 30 | { 31 | int value = 0; 32 | EncryptFloat encrypt = value; 33 | 34 | Assert.IsTrue(encrypt == value); 35 | } 36 | 37 | [Test] 38 | public void EncryptEquals() 39 | { 40 | EncryptFloat one = 0; 41 | EncryptFloat other = 0; 42 | 43 | Assert.IsTrue(one == other); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /Assets/Tests/EncryptFloatTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e932b437732443a91c69080363e9ea1 3 | timeCreated: 1663562514 -------------------------------------------------------------------------------- /Assets/Tests/EncryptIntTest.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | 4 | namespace Tests 5 | { 6 | public class EncryptIntTest 7 | { 8 | [Test] 9 | public void Encrypt2Int() 10 | { 11 | EncryptInt encrypt = 0; 12 | 13 | Assert.IsTrue(encrypt == 0); 14 | 15 | encrypt.Set(1); 16 | Assert.IsTrue(encrypt == 1); 17 | 18 | encrypt.Set(2); 19 | Assert.IsTrue(encrypt == 2); 20 | 21 | encrypt.Set(3); 22 | Assert.IsTrue(encrypt == 3); 23 | 24 | encrypt.Set(257); 25 | Assert.IsTrue(encrypt == 257); 26 | } 27 | 28 | [Test] 29 | public void Int2Encrypt() 30 | { 31 | int value = 0; 32 | EncryptInt encrypt = value; 33 | 34 | Assert.IsTrue(encrypt == value); 35 | } 36 | 37 | [Test] 38 | public void EncryptEquals() 39 | { 40 | EncryptInt one = 0; 41 | EncryptInt other = 0; 42 | 43 | Assert.IsTrue(one == other); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /Assets/Tests/EncryptIntTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fad90775b7504ec99e1950d31e15d835 3 | timeCreated: 1663554149 -------------------------------------------------------------------------------- /Assets/Tests/EncryptLongTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Encrypt; 3 | using NUnit.Framework; 4 | 5 | namespace Tests 6 | { 7 | public class EncryptLongTest 8 | { 9 | [Test] 10 | public void Encrypt2Long() 11 | { 12 | EncryptLong encrypt = 0; 13 | 14 | Assert.IsTrue(encrypt == 0); 15 | 16 | encrypt.Set(1); 17 | Assert.IsTrue(encrypt == 1); 18 | 19 | encrypt.Set(2); 20 | Assert.IsTrue(encrypt == 2); 21 | 22 | encrypt.Set(3); 23 | Assert.IsTrue(encrypt == 3); 24 | 25 | encrypt.Set(257); 26 | Assert.IsTrue(encrypt == 257); 27 | } 28 | 29 | [Test] 30 | public void Long2Encrypt() 31 | { 32 | int value = 0; 33 | EncryptLong encrypt = value; 34 | 35 | Assert.IsTrue(encrypt == value); 36 | } 37 | 38 | [Test] 39 | public void EncryptEquals() 40 | { 41 | EncryptLong one = 0; 42 | EncryptLong other = 0; 43 | 44 | Assert.IsTrue(one == other); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Assets/Tests/EncryptLongTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc208b5cd0aa4db7b42fa83f73388ad0 3 | timeCreated: 1663562601 -------------------------------------------------------------------------------- /Assets/Tests/EncryptSByteTest.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Encrypt; 3 | using NUnit.Framework; 4 | 5 | namespace Tests 6 | { 7 | public class EncryptSByteTest 8 | { 9 | [Test] 10 | public void Encrypt2SByte() 11 | { 12 | EncryptSByte encrypt = 0; 13 | 14 | Assert.IsTrue(encrypt == 0); 15 | 16 | encrypt.Set(1); 17 | Assert.IsTrue(encrypt == 1); 18 | 19 | encrypt.Set(2); 20 | Assert.IsTrue(encrypt == 2); 21 | 22 | encrypt.Set(3); 23 | Assert.IsTrue(encrypt == 3); 24 | 25 | encrypt.Set(64); 26 | Assert.IsTrue(encrypt == 64); 27 | } 28 | 29 | [Test] 30 | public void SByte2Encrypt() 31 | { 32 | sbyte value = 0; 33 | EncryptSByte encrypt = value; 34 | 35 | Assert.IsTrue(encrypt == value); 36 | } 37 | 38 | [Test] 39 | public void EncryptEquals() 40 | { 41 | EncryptSByte one = 0; 42 | EncryptSByte other = 0; 43 | 44 | Assert.IsTrue(one == other); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Assets/Tests/EncryptSByteTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12ab564a7dfa4a0daf1657bc8a2fb078 3 | timeCreated: 1663750287 -------------------------------------------------------------------------------- /Assets/Tests/EncryptShort.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | 4 | namespace Tests 5 | { 6 | public class EncryptShortTest 7 | { 8 | [Test] 9 | public void Encrypt2Short() 10 | { 11 | EncryptShort encrypt = 0; 12 | 13 | Assert.IsTrue(encrypt == 0); 14 | 15 | encrypt.Set(1); 16 | Assert.IsTrue(encrypt == 1); 17 | 18 | encrypt.Set(2); 19 | Assert.IsTrue(encrypt == 2); 20 | 21 | encrypt.Set(3); 22 | Assert.IsTrue(encrypt == 3); 23 | 24 | encrypt.Set(64); 25 | Assert.IsTrue(encrypt == 64); 26 | } 27 | 28 | [Test] 29 | public void Short2Encrypt() 30 | { 31 | short value = 0; 32 | EncryptShort encrypt = value; 33 | 34 | Assert.IsTrue(encrypt == value); 35 | } 36 | 37 | [Test] 38 | public void EncryptEquals() 39 | { 40 | EncryptShort one = 0; 41 | EncryptShort other = 0; 42 | 43 | Assert.IsTrue(one == other); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /Assets/Tests/EncryptShort.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 940773bf87864e9c96645ff754b760cc 3 | timeCreated: 1663750432 -------------------------------------------------------------------------------- /Assets/Tests/EncryptUIntTest.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | 4 | namespace Tests 5 | { 6 | public class EncryptUIntTest 7 | { 8 | [Test] 9 | public void Encrypt2UInt() 10 | { 11 | EncryptUInt encrypt = 0; 12 | 13 | Assert.IsTrue(encrypt == 0); 14 | 15 | encrypt.Set(1); 16 | Assert.IsTrue(encrypt == 1); 17 | 18 | encrypt.Set(2); 19 | Assert.IsTrue(encrypt == 2); 20 | 21 | encrypt.Set(3); 22 | Assert.IsTrue(encrypt == 3); 23 | 24 | encrypt.Set(64); 25 | Assert.IsTrue(encrypt == 64); 26 | } 27 | 28 | [Test] 29 | public void UInt2Encrypt() 30 | { 31 | uint value = 0; 32 | EncryptUInt encrypt = value; 33 | 34 | Assert.IsTrue(encrypt == value); 35 | } 36 | 37 | [Test] 38 | public void EncryptEquals() 39 | { 40 | EncryptUInt one = 0; 41 | EncryptUInt other = 0; 42 | 43 | Assert.IsTrue(one == other); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /Assets/Tests/EncryptUIntTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 80bd3671fcca4f81a01437fe0d8daaee 3 | timeCreated: 1663750469 -------------------------------------------------------------------------------- /Assets/Tests/EncryptULongTest.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | 4 | namespace Tests 5 | { 6 | public class EncryptULongTest 7 | { 8 | [Test] 9 | public void Encrypt2ULong() 10 | { 11 | EncryptULong encrypt = 0; 12 | 13 | Assert.IsTrue(encrypt == 0); 14 | 15 | encrypt.Set(1); 16 | Assert.IsTrue(encrypt == 1); 17 | 18 | encrypt.Set(2); 19 | Assert.IsTrue(encrypt == 2); 20 | 21 | encrypt.Set(3); 22 | Assert.IsTrue(encrypt == 3); 23 | 24 | encrypt.Set(64); 25 | Assert.IsTrue(encrypt == 64); 26 | } 27 | 28 | [Test] 29 | public void ULong2Encrypt() 30 | { 31 | ulong value = 0; 32 | EncryptULong encrypt = value; 33 | 34 | Assert.IsTrue(encrypt == value); 35 | } 36 | 37 | [Test] 38 | public void EncryptEquals() 39 | { 40 | EncryptULong one = 0; 41 | EncryptULong other = 0; 42 | 43 | Assert.IsTrue(one == other); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /Assets/Tests/EncryptULongTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d78f23aba1ad4f03a222e584caf363b2 3 | timeCreated: 1663750503 -------------------------------------------------------------------------------- /Assets/Tests/EncryptUShortTest.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | 4 | namespace Tests 5 | { 6 | public class EncryptUShortTest 7 | { 8 | [Test] 9 | public void Encrypt2UShort() 10 | { 11 | EncryptUShort encrypt = 0; 12 | 13 | Assert.IsTrue(encrypt == 0); 14 | 15 | encrypt.Set(1); 16 | Assert.IsTrue(encrypt == 1); 17 | 18 | encrypt.Set(2); 19 | Assert.IsTrue(encrypt == 2); 20 | 21 | encrypt.Set(3); 22 | Assert.IsTrue(encrypt == 3); 23 | 24 | encrypt.Set(64); 25 | Assert.IsTrue(encrypt == 64); 26 | } 27 | 28 | [Test] 29 | public void UShort2Encrypt() 30 | { 31 | ushort value = 0; 32 | EncryptUShort encrypt = value; 33 | 34 | Assert.IsTrue(encrypt == value); 35 | } 36 | 37 | [Test] 38 | public void EncryptEquals() 39 | { 40 | EncryptUShort one = 0; 41 | EncryptUShort other = 0; 42 | 43 | Assert.IsTrue(one == other); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /Assets/Tests/EncryptUShortTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18d8a64905654b0dade7507f9d879777 3 | timeCreated: 1663750533 -------------------------------------------------------------------------------- /Assets/Tests/Performance.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d192d7ccc9544f1abb7d7000698bf2ae 3 | timeCreated: 1663555703 -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptBytePerformance.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | using Unity.PerformanceTesting; 4 | 5 | namespace Tests 6 | { 7 | public class EncryptBytePerformance 8 | { 9 | [Test, Performance] 10 | public void EncryptSet_10000_10() 11 | { 12 | EncryptByte encrypt = 0; 13 | Measure.Method(() => { encrypt.Set(1); }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 14 | } 15 | 16 | [Test, Performance] 17 | public void EncryptEqualsSet_10000_10() 18 | { 19 | EncryptByte encrypt = 0; 20 | Measure.Method(() => { encrypt = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 21 | } 22 | 23 | [Test, Performance] 24 | public void ByteSet_10000_10() 25 | { 26 | byte value = 0; 27 | Measure.Method(() => { value = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 28 | } 29 | 30 | [Test, Performance] 31 | public void EncryptGet_10000_10() 32 | { 33 | EncryptByte encrypt = 0; 34 | Measure.Method( 35 | () => 36 | { 37 | byte _ = encrypt; 38 | } 39 | ). 40 | IterationsPerMeasurement(10000). 41 | MeasurementCount(10). 42 | Run(); 43 | } 44 | 45 | [Test, Performance] 46 | public void ByteGet_10000_10() 47 | { 48 | byte value = 0; 49 | 50 | Measure.Method( 51 | () => 52 | { 53 | byte _ = value; 54 | } 55 | ). 56 | IterationsPerMeasurement(10000). 57 | MeasurementCount(10). 58 | Run(); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptBytePerformance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17f1cd862cb44fb9ab713e7eb7c37ecf 3 | timeCreated: 1663750578 -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptDoublePerformance.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | using Unity.PerformanceTesting; 4 | 5 | namespace Tests 6 | { 7 | public class EncryptDoublePerformance 8 | { 9 | [Test, Performance] 10 | public void EncryptSet_10000_10() 11 | { 12 | EncryptDouble encrypt = 0; 13 | Measure.Method(() => { encrypt.Set(1); }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 14 | } 15 | 16 | [Test, Performance] 17 | public void EncryptEqualsSet_10000_10() 18 | { 19 | EncryptDouble encrypt = 0; 20 | Measure.Method(() => { encrypt = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 21 | } 22 | 23 | [Test, Performance] 24 | public void DoubleSet_10000_10() 25 | { 26 | double value = 0; 27 | Measure.Method(() => { value = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 28 | } 29 | 30 | [Test, Performance] 31 | public void EncryptGet_10000_10() 32 | { 33 | EncryptDouble encrypt = 0; 34 | Measure.Method( 35 | () => 36 | { 37 | double _ = encrypt; 38 | } 39 | ). 40 | IterationsPerMeasurement(10000). 41 | MeasurementCount(10). 42 | Run(); 43 | } 44 | 45 | [Test, Performance] 46 | public void DoubleGet_10000_10() 47 | { 48 | double value = 0; 49 | 50 | Measure.Method( 51 | () => 52 | { 53 | double _ = value; 54 | } 55 | ). 56 | IterationsPerMeasurement(10000). 57 | MeasurementCount(10). 58 | Run(); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptDoublePerformance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2df34bee8b2047878a286206b15488c0 3 | timeCreated: 1663562947 -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptFloatPerformance.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | using Unity.PerformanceTesting; 4 | 5 | namespace Tests 6 | { 7 | public class EncryptFloatPerformance 8 | { 9 | [Test, Performance] 10 | public void EncryptSet_10000_10() 11 | { 12 | EncryptFloat encrypt = 0; 13 | Measure.Method(() => { encrypt.Set(1); }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 14 | } 15 | 16 | [Test, Performance] 17 | public void EncryptEqualsSet_10000_10() 18 | { 19 | EncryptFloat encrypt = 0; 20 | Measure.Method(() => { encrypt = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 21 | } 22 | 23 | [Test, Performance] 24 | public void FloatSet_10000_10() 25 | { 26 | float value = 0; 27 | Measure.Method(() => { value = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 28 | } 29 | 30 | [Test, Performance] 31 | public void EncryptGet_10000_10() 32 | { 33 | EncryptFloat encrypt = 0; 34 | Measure.Method( 35 | () => 36 | { 37 | float _ = encrypt; 38 | } 39 | ). 40 | IterationsPerMeasurement(10000). 41 | MeasurementCount(10). 42 | Run(); 43 | } 44 | 45 | [Test, Performance] 46 | public void FloatGet_10000_10() 47 | { 48 | float value = 0; 49 | 50 | Measure.Method( 51 | () => 52 | { 53 | float _ = value; 54 | } 55 | ). 56 | IterationsPerMeasurement(10000). 57 | MeasurementCount(10). 58 | Run(); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptFloatPerformance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 262eb1285282499d87e4f4847b46d043 3 | timeCreated: 1663562914 -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptIntPerformance.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | using Unity.PerformanceTesting; 4 | 5 | namespace Tests 6 | { 7 | public class EncryptIntPerformance 8 | { 9 | [Test, Performance] 10 | public void EncryptSet_10000_10() 11 | { 12 | EncryptInt encrypt = 0; 13 | Measure.Method(() => { encrypt.Set(1); }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 14 | } 15 | 16 | [Test, Performance] 17 | public void EncryptEqualsSet_10000_10() 18 | { 19 | EncryptInt encrypt = 0; 20 | Measure.Method(() => { encrypt = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 21 | } 22 | 23 | [Test, Performance] 24 | public void IntSet_10000_10() 25 | { 26 | int value = 0; 27 | Measure.Method(() => { value = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 28 | } 29 | 30 | [Test, Performance] 31 | public void EncryptGet_10000_10() 32 | { 33 | EncryptInt encrypt = 0; 34 | Measure.Method( 35 | () => 36 | { 37 | int _ = encrypt; 38 | } 39 | ). 40 | IterationsPerMeasurement(10000). 41 | MeasurementCount(10). 42 | Run(); 43 | } 44 | 45 | [Test, Performance] 46 | public void IntGet_10000_10() 47 | { 48 | int value = 0; 49 | 50 | Measure.Method( 51 | () => 52 | { 53 | int _ = value; 54 | } 55 | ). 56 | IterationsPerMeasurement(10000). 57 | MeasurementCount(10). 58 | Run(); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptIntPerformance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: feab32f531894c1a8ba8a167b83f2b04 3 | timeCreated: 1663555727 -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptLongPerformance.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | using Unity.PerformanceTesting; 4 | 5 | namespace Tests 6 | { 7 | public class EncryptLongPerformance 8 | { 9 | [Test, Performance] 10 | public void EncryptSet_10000_10() 11 | { 12 | EncryptLong encrypt = 0; 13 | Measure.Method(() => { encrypt.Set(1); }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 14 | } 15 | 16 | [Test, Performance] 17 | public void EncryptEqualsSet_10000_10() 18 | { 19 | EncryptLong encrypt = 0; 20 | Measure.Method(() => { encrypt = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 21 | } 22 | 23 | [Test, Performance] 24 | public void LongSet_10000_10() 25 | { 26 | long value = 0; 27 | Measure.Method(() => { value = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 28 | } 29 | 30 | [Test, Performance] 31 | public void EncryptGet_10000_10() 32 | { 33 | EncryptLong encrypt = 0; 34 | Measure.Method( 35 | () => 36 | { 37 | var _ = encrypt; 38 | } 39 | ). 40 | IterationsPerMeasurement(10000). 41 | MeasurementCount(10). 42 | Run(); 43 | } 44 | 45 | [Test, Performance] 46 | public void LongGet_10000_10() 47 | { 48 | long value = 0; 49 | 50 | Measure.Method( 51 | () => 52 | { 53 | var _ = value; 54 | } 55 | ). 56 | IterationsPerMeasurement(10000). 57 | MeasurementCount(10). 58 | Run(); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptLongPerformance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b4d6104d14e4b45b4b7a84eddeaf8ca 3 | timeCreated: 1663562855 -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptSBytePerformance.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | using Unity.PerformanceTesting; 4 | 5 | namespace Tests 6 | { 7 | public class EncryptSBytePerformance 8 | { 9 | [Test, Performance] 10 | public void EncryptSet_10000_10() 11 | { 12 | EncryptSByte encrypt = 0; 13 | Measure.Method(() => { encrypt.Set(1); }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 14 | } 15 | 16 | [Test, Performance] 17 | public void EncryptEqualsSet_10000_10() 18 | { 19 | EncryptSByte encrypt = 0; 20 | Measure.Method(() => { encrypt = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 21 | } 22 | 23 | [Test, Performance] 24 | public void SByteSet_10000_10() 25 | { 26 | sbyte value = 0; 27 | Measure.Method(() => { value = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 28 | } 29 | 30 | [Test, Performance] 31 | public void EncryptGet_10000_10() 32 | { 33 | EncryptSByte encrypt = 0; 34 | Measure.Method( 35 | () => 36 | { 37 | sbyte _ = encrypt; 38 | } 39 | ). 40 | IterationsPerMeasurement(10000). 41 | MeasurementCount(10). 42 | Run(); 43 | } 44 | 45 | [Test, Performance] 46 | public void SByteGet_10000_10() 47 | { 48 | sbyte value = 0; 49 | 50 | Measure.Method( 51 | () => 52 | { 53 | sbyte _ = value; 54 | } 55 | ). 56 | IterationsPerMeasurement(10000). 57 | MeasurementCount(10). 58 | Run(); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptSBytePerformance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a08a21d5c18549939468db78e2c2c8b1 3 | timeCreated: 1663750623 -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptShortPerformance.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | using Unity.PerformanceTesting; 4 | 5 | namespace Tests 6 | { 7 | public class EncryptShortPerformance 8 | { 9 | [Test, Performance] 10 | public void EncryptSet_10000_10() 11 | { 12 | EncryptShort encrypt = 0; 13 | Measure.Method(() => { encrypt.Set(1); }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 14 | } 15 | 16 | [Test, Performance] 17 | public void EncryptEqualsSet_10000_10() 18 | { 19 | EncryptShort encrypt = 0; 20 | Measure.Method(() => { encrypt = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 21 | } 22 | 23 | [Test, Performance] 24 | public void ShortSet_10000_10() 25 | { 26 | short value = 0; 27 | Measure.Method(() => { value = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 28 | } 29 | 30 | [Test, Performance] 31 | public void EncryptGet_10000_10() 32 | { 33 | EncryptShort encrypt = 0; 34 | Measure.Method( 35 | () => 36 | { 37 | short _ = encrypt; 38 | } 39 | ). 40 | IterationsPerMeasurement(10000). 41 | MeasurementCount(10). 42 | Run(); 43 | } 44 | 45 | [Test, Performance] 46 | public void ShortGet_10000_10() 47 | { 48 | short value = 0; 49 | 50 | Measure.Method( 51 | () => 52 | { 53 | short _ = value; 54 | } 55 | ). 56 | IterationsPerMeasurement(10000). 57 | MeasurementCount(10). 58 | Run(); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptShortPerformance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 894771988d2c47c3a7257c2c768cdb15 3 | timeCreated: 1663750663 -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptUIntPerformance.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | using Unity.PerformanceTesting; 4 | 5 | namespace Tests 6 | { 7 | public class EncryptUIntPerformance 8 | { 9 | [Test, Performance] 10 | public void EncryptSet_10000_10() 11 | { 12 | EncryptUInt encrypt = 0; 13 | Measure.Method(() => { encrypt.Set(1); }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 14 | } 15 | 16 | [Test, Performance] 17 | public void EncryptEqualsSet_10000_10() 18 | { 19 | EncryptUInt encrypt = 0; 20 | Measure.Method(() => { encrypt = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 21 | } 22 | 23 | [Test, Performance] 24 | public void UIntSet_10000_10() 25 | { 26 | uint value = 0; 27 | Measure.Method(() => { value = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 28 | } 29 | 30 | [Test, Performance] 31 | public void EncryptGet_10000_10() 32 | { 33 | EncryptUInt encrypt = 0; 34 | Measure.Method( 35 | () => 36 | { 37 | uint _ = encrypt; 38 | } 39 | ). 40 | IterationsPerMeasurement(10000). 41 | MeasurementCount(10). 42 | Run(); 43 | } 44 | 45 | [Test, Performance] 46 | public void UIntGet_10000_10() 47 | { 48 | uint value = 0; 49 | 50 | Measure.Method( 51 | () => 52 | { 53 | uint _ = value; 54 | } 55 | ). 56 | IterationsPerMeasurement(10000). 57 | MeasurementCount(10). 58 | Run(); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptUIntPerformance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae2f5a74b5fd41569963919659b45fcb 3 | timeCreated: 1663750699 -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptULongPerformance.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | using Unity.PerformanceTesting; 4 | 5 | namespace Tests 6 | { 7 | public class EncryptULongPerformance 8 | { 9 | [Test, Performance] 10 | public void EncryptSet_10000_10() 11 | { 12 | EncryptULong encrypt = 0; 13 | Measure.Method(() => { encrypt.Set(1); }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 14 | } 15 | 16 | [Test, Performance] 17 | public void EncryptEqualsSet_10000_10() 18 | { 19 | EncryptULong encrypt = 0; 20 | Measure.Method(() => { encrypt = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 21 | } 22 | 23 | [Test, Performance] 24 | public void ULongSet_10000_10() 25 | { 26 | ulong value = 0; 27 | Measure.Method(() => { value = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 28 | } 29 | 30 | [Test, Performance] 31 | public void EncryptGet_10000_10() 32 | { 33 | EncryptULong encrypt = 0; 34 | Measure.Method( 35 | () => 36 | { 37 | ulong _ = encrypt; 38 | } 39 | ). 40 | IterationsPerMeasurement(10000). 41 | MeasurementCount(10). 42 | Run(); 43 | } 44 | 45 | [Test, Performance] 46 | public void ULongGet_10000_10() 47 | { 48 | ulong value = 0; 49 | 50 | Measure.Method( 51 | () => 52 | { 53 | ulong _ = value; 54 | } 55 | ). 56 | IterationsPerMeasurement(10000). 57 | MeasurementCount(10). 58 | Run(); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptULongPerformance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f06625bac5e6492f88a1a320d6ecb746 3 | timeCreated: 1663750731 -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptUShortPerformance.cs: -------------------------------------------------------------------------------- 1 | using Encrypt; 2 | using NUnit.Framework; 3 | using Unity.PerformanceTesting; 4 | 5 | namespace Tests 6 | { 7 | public class EncryptUShortPerformance 8 | { 9 | [Test, Performance] 10 | public void EncryptSet_10000_10() 11 | { 12 | EncryptUShort encrypt = 0; 13 | Measure.Method(() => { encrypt.Set(1); }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 14 | } 15 | 16 | [Test, Performance] 17 | public void EncryptEqualsSet_10000_10() 18 | { 19 | EncryptUShort encrypt = 0; 20 | Measure.Method(() => { encrypt = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 21 | } 22 | 23 | [Test, Performance] 24 | public void UShortSet_10000_10() 25 | { 26 | ushort value = 0; 27 | Measure.Method(() => { value = 1; }).IterationsPerMeasurement(10000).MeasurementCount(10).Run(); 28 | } 29 | 30 | [Test, Performance] 31 | public void EncryptGet_10000_10() 32 | { 33 | EncryptUShort encrypt = 0; 34 | Measure.Method( 35 | () => 36 | { 37 | ushort _ = encrypt; 38 | } 39 | ). 40 | IterationsPerMeasurement(10000). 41 | MeasurementCount(10). 42 | Run(); 43 | } 44 | 45 | [Test, Performance] 46 | public void UShortGet_10000_10() 47 | { 48 | ushort value = 0; 49 | 50 | Measure.Method( 51 | () => 52 | { 53 | ushort _ = value; 54 | } 55 | ). 56 | IterationsPerMeasurement(10000). 57 | MeasurementCount(10). 58 | Run(); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /Assets/Tests/Performance/EncryptUShortPerformance.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50dcb861a6904ae892498177c861f6a2 3 | timeCreated: 1663750770 -------------------------------------------------------------------------------- /Assets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.liuocean.encrypt", 3 | "displayName": "Encrypt", 4 | "description": "值类型内存加密工具", 5 | "version": "1.0.0", 6 | "dependencies": { 7 | } 8 | } -------------------------------------------------------------------------------- /Assets/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b931d79934eb4230b0d23ee566c48f2 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 L 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.test-framework.performance": "2.7.0-preview", 4 | "com.unity.collab-proxy": "1.17.2", 5 | "com.unity.feature.2d": "1.0.0", 6 | "com.unity.ide.rider": "3.0.15", 7 | "com.unity.ide.visualstudio": "2.0.16", 8 | "com.unity.ide.vscode": "1.2.5", 9 | "com.unity.test-framework": "1.1.31", 10 | "com.unity.textmeshpro": "3.0.6", 11 | "com.unity.timeline": "1.6.4", 12 | "com.unity.ugui": "1.0.0", 13 | "com.unity.visualscripting": "1.7.8", 14 | "com.unity.modules.ai": "1.0.0", 15 | "com.unity.modules.androidjni": "1.0.0", 16 | "com.unity.modules.animation": "1.0.0", 17 | "com.unity.modules.assetbundle": "1.0.0", 18 | "com.unity.modules.audio": "1.0.0", 19 | "com.unity.modules.cloth": "1.0.0", 20 | "com.unity.modules.director": "1.0.0", 21 | "com.unity.modules.imageconversion": "1.0.0", 22 | "com.unity.modules.imgui": "1.0.0", 23 | "com.unity.modules.jsonserialize": "1.0.0", 24 | "com.unity.modules.particlesystem": "1.0.0", 25 | "com.unity.modules.physics": "1.0.0", 26 | "com.unity.modules.physics2d": "1.0.0", 27 | "com.unity.modules.screencapture": "1.0.0", 28 | "com.unity.modules.terrain": "1.0.0", 29 | "com.unity.modules.terrainphysics": "1.0.0", 30 | "com.unity.modules.tilemap": "1.0.0", 31 | "com.unity.modules.ui": "1.0.0", 32 | "com.unity.modules.uielements": "1.0.0", 33 | "com.unity.modules.umbra": "1.0.0", 34 | "com.unity.modules.unityanalytics": "1.0.0", 35 | "com.unity.modules.unitywebrequest": "1.0.0", 36 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 37 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 38 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 39 | "com.unity.modules.unitywebrequestwww": "1.0.0", 40 | "com.unity.modules.vehicles": "1.0.0", 41 | "com.unity.modules.video": "1.0.0", 42 | "com.unity.modules.vr": "1.0.0", 43 | "com.unity.modules.wind": "1.0.0", 44 | "com.unity.modules.xr": "1.0.0" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.animation": { 4 | "version": "7.0.6", 5 | "depth": 1, 6 | "source": "registry", 7 | "dependencies": { 8 | "com.unity.2d.common": "6.0.3", 9 | "com.unity.2d.sprite": "1.0.0", 10 | "com.unity.modules.animation": "1.0.0", 11 | "com.unity.modules.uielements": "1.0.0" 12 | }, 13 | "url": "https://packages.unity.com" 14 | }, 15 | "com.unity.2d.common": { 16 | "version": "6.0.3", 17 | "depth": 2, 18 | "source": "registry", 19 | "dependencies": { 20 | "com.unity.2d.sprite": "1.0.0", 21 | "com.unity.mathematics": "1.1.0", 22 | "com.unity.modules.uielements": "1.0.0", 23 | "com.unity.burst": "1.5.1" 24 | }, 25 | "url": "https://packages.unity.com" 26 | }, 27 | "com.unity.2d.path": { 28 | "version": "5.0.2", 29 | "depth": 2, 30 | "source": "registry", 31 | "dependencies": {}, 32 | "url": "https://packages.unity.com" 33 | }, 34 | "com.unity.2d.pixel-perfect": { 35 | "version": "5.0.1", 36 | "depth": 1, 37 | "source": "registry", 38 | "dependencies": {}, 39 | "url": "https://packages.unity.com" 40 | }, 41 | "com.unity.2d.psdimporter": { 42 | "version": "6.0.4", 43 | "depth": 1, 44 | "source": "registry", 45 | "dependencies": { 46 | "com.unity.2d.animation": "7.0.6", 47 | "com.unity.2d.common": "6.0.3", 48 | "com.unity.2d.sprite": "1.0.0" 49 | }, 50 | "url": "https://packages.unity.com" 51 | }, 52 | "com.unity.2d.sprite": { 53 | "version": "1.0.0", 54 | "depth": 1, 55 | "source": "builtin", 56 | "dependencies": {} 57 | }, 58 | "com.unity.2d.spriteshape": { 59 | "version": "7.0.5", 60 | "depth": 1, 61 | "source": "registry", 62 | "dependencies": { 63 | "com.unity.mathematics": "1.1.0", 64 | "com.unity.2d.common": "6.0.3", 65 | "com.unity.2d.path": "5.0.2", 66 | "com.unity.modules.physics2d": "1.0.0" 67 | }, 68 | "url": "https://packages.unity.com" 69 | }, 70 | "com.unity.2d.tilemap": { 71 | "version": "1.0.0", 72 | "depth": 1, 73 | "source": "builtin", 74 | "dependencies": {} 75 | }, 76 | "com.unity.2d.tilemap.extras": { 77 | "version": "2.2.3", 78 | "depth": 1, 79 | "source": "registry", 80 | "dependencies": { 81 | "com.unity.modules.tilemap": "1.0.0", 82 | "com.unity.2d.tilemap": "1.0.0", 83 | "com.unity.ugui": "1.0.0", 84 | "com.unity.modules.jsonserialize": "1.0.0" 85 | }, 86 | "url": "https://packages.unity.com" 87 | }, 88 | "com.unity.burst": { 89 | "version": "1.6.6", 90 | "depth": 3, 91 | "source": "registry", 92 | "dependencies": { 93 | "com.unity.mathematics": "1.2.1" 94 | }, 95 | "url": "https://packages.unity.com" 96 | }, 97 | "com.unity.collab-proxy": { 98 | "version": "1.17.2", 99 | "depth": 0, 100 | "source": "registry", 101 | "dependencies": { 102 | "com.unity.services.core": "1.0.1" 103 | }, 104 | "url": "https://packages.unity.com" 105 | }, 106 | "com.unity.ext.nunit": { 107 | "version": "1.0.6", 108 | "depth": 1, 109 | "source": "registry", 110 | "dependencies": {}, 111 | "url": "https://packages.unity.com" 112 | }, 113 | "com.unity.feature.2d": { 114 | "version": "1.0.0", 115 | "depth": 0, 116 | "source": "builtin", 117 | "dependencies": { 118 | "com.unity.2d.animation": "7.0.6", 119 | "com.unity.2d.pixel-perfect": "5.0.1", 120 | "com.unity.2d.psdimporter": "6.0.4", 121 | "com.unity.2d.sprite": "1.0.0", 122 | "com.unity.2d.spriteshape": "7.0.5", 123 | "com.unity.2d.tilemap": "1.0.0", 124 | "com.unity.2d.tilemap.extras": "2.2.3" 125 | } 126 | }, 127 | "com.unity.ide.rider": { 128 | "version": "3.0.15", 129 | "depth": 0, 130 | "source": "registry", 131 | "dependencies": { 132 | "com.unity.ext.nunit": "1.0.6" 133 | }, 134 | "url": "https://packages.unity.com" 135 | }, 136 | "com.unity.ide.visualstudio": { 137 | "version": "2.0.16", 138 | "depth": 0, 139 | "source": "registry", 140 | "dependencies": { 141 | "com.unity.test-framework": "1.1.9" 142 | }, 143 | "url": "https://packages.unity.com" 144 | }, 145 | "com.unity.ide.vscode": { 146 | "version": "1.2.5", 147 | "depth": 0, 148 | "source": "registry", 149 | "dependencies": {}, 150 | "url": "https://packages.unity.com" 151 | }, 152 | "com.unity.mathematics": { 153 | "version": "1.2.6", 154 | "depth": 2, 155 | "source": "registry", 156 | "dependencies": {}, 157 | "url": "https://packages.unity.com" 158 | }, 159 | "com.unity.nuget.newtonsoft-json": { 160 | "version": "3.0.2", 161 | "depth": 2, 162 | "source": "registry", 163 | "dependencies": {}, 164 | "url": "https://packages.unity.com" 165 | }, 166 | "com.unity.services.core": { 167 | "version": "1.4.2", 168 | "depth": 1, 169 | "source": "registry", 170 | "dependencies": { 171 | "com.unity.modules.unitywebrequest": "1.0.0", 172 | "com.unity.nuget.newtonsoft-json": "3.0.2", 173 | "com.unity.modules.androidjni": "1.0.0" 174 | }, 175 | "url": "https://packages.unity.com" 176 | }, 177 | "com.unity.test-framework": { 178 | "version": "1.1.31", 179 | "depth": 0, 180 | "source": "registry", 181 | "dependencies": { 182 | "com.unity.ext.nunit": "1.0.6", 183 | "com.unity.modules.imgui": "1.0.0", 184 | "com.unity.modules.jsonserialize": "1.0.0" 185 | }, 186 | "url": "https://packages.unity.com" 187 | }, 188 | "com.unity.test-framework.performance": { 189 | "version": "2.7.0-preview", 190 | "depth": 0, 191 | "source": "registry", 192 | "dependencies": { 193 | "com.unity.test-framework": "1.1.0", 194 | "com.unity.modules.jsonserialize": "1.0.0" 195 | }, 196 | "url": "https://packages.unity.com" 197 | }, 198 | "com.unity.textmeshpro": { 199 | "version": "3.0.6", 200 | "depth": 0, 201 | "source": "registry", 202 | "dependencies": { 203 | "com.unity.ugui": "1.0.0" 204 | }, 205 | "url": "https://packages.unity.com" 206 | }, 207 | "com.unity.timeline": { 208 | "version": "1.6.4", 209 | "depth": 0, 210 | "source": "registry", 211 | "dependencies": { 212 | "com.unity.modules.director": "1.0.0", 213 | "com.unity.modules.animation": "1.0.0", 214 | "com.unity.modules.audio": "1.0.0", 215 | "com.unity.modules.particlesystem": "1.0.0" 216 | }, 217 | "url": "https://packages.unity.com" 218 | }, 219 | "com.unity.ugui": { 220 | "version": "1.0.0", 221 | "depth": 0, 222 | "source": "builtin", 223 | "dependencies": { 224 | "com.unity.modules.ui": "1.0.0", 225 | "com.unity.modules.imgui": "1.0.0" 226 | } 227 | }, 228 | "com.unity.visualscripting": { 229 | "version": "1.7.8", 230 | "depth": 0, 231 | "source": "registry", 232 | "dependencies": { 233 | "com.unity.ugui": "1.0.0", 234 | "com.unity.modules.jsonserialize": "1.0.0" 235 | }, 236 | "url": "https://packages.unity.com" 237 | }, 238 | "com.unity.modules.ai": { 239 | "version": "1.0.0", 240 | "depth": 0, 241 | "source": "builtin", 242 | "dependencies": {} 243 | }, 244 | "com.unity.modules.androidjni": { 245 | "version": "1.0.0", 246 | "depth": 0, 247 | "source": "builtin", 248 | "dependencies": {} 249 | }, 250 | "com.unity.modules.animation": { 251 | "version": "1.0.0", 252 | "depth": 0, 253 | "source": "builtin", 254 | "dependencies": {} 255 | }, 256 | "com.unity.modules.assetbundle": { 257 | "version": "1.0.0", 258 | "depth": 0, 259 | "source": "builtin", 260 | "dependencies": {} 261 | }, 262 | "com.unity.modules.audio": { 263 | "version": "1.0.0", 264 | "depth": 0, 265 | "source": "builtin", 266 | "dependencies": {} 267 | }, 268 | "com.unity.modules.cloth": { 269 | "version": "1.0.0", 270 | "depth": 0, 271 | "source": "builtin", 272 | "dependencies": { 273 | "com.unity.modules.physics": "1.0.0" 274 | } 275 | }, 276 | "com.unity.modules.director": { 277 | "version": "1.0.0", 278 | "depth": 0, 279 | "source": "builtin", 280 | "dependencies": { 281 | "com.unity.modules.audio": "1.0.0", 282 | "com.unity.modules.animation": "1.0.0" 283 | } 284 | }, 285 | "com.unity.modules.imageconversion": { 286 | "version": "1.0.0", 287 | "depth": 0, 288 | "source": "builtin", 289 | "dependencies": {} 290 | }, 291 | "com.unity.modules.imgui": { 292 | "version": "1.0.0", 293 | "depth": 0, 294 | "source": "builtin", 295 | "dependencies": {} 296 | }, 297 | "com.unity.modules.jsonserialize": { 298 | "version": "1.0.0", 299 | "depth": 0, 300 | "source": "builtin", 301 | "dependencies": {} 302 | }, 303 | "com.unity.modules.particlesystem": { 304 | "version": "1.0.0", 305 | "depth": 0, 306 | "source": "builtin", 307 | "dependencies": {} 308 | }, 309 | "com.unity.modules.physics": { 310 | "version": "1.0.0", 311 | "depth": 0, 312 | "source": "builtin", 313 | "dependencies": {} 314 | }, 315 | "com.unity.modules.physics2d": { 316 | "version": "1.0.0", 317 | "depth": 0, 318 | "source": "builtin", 319 | "dependencies": {} 320 | }, 321 | "com.unity.modules.screencapture": { 322 | "version": "1.0.0", 323 | "depth": 0, 324 | "source": "builtin", 325 | "dependencies": { 326 | "com.unity.modules.imageconversion": "1.0.0" 327 | } 328 | }, 329 | "com.unity.modules.subsystems": { 330 | "version": "1.0.0", 331 | "depth": 1, 332 | "source": "builtin", 333 | "dependencies": { 334 | "com.unity.modules.jsonserialize": "1.0.0" 335 | } 336 | }, 337 | "com.unity.modules.terrain": { 338 | "version": "1.0.0", 339 | "depth": 0, 340 | "source": "builtin", 341 | "dependencies": {} 342 | }, 343 | "com.unity.modules.terrainphysics": { 344 | "version": "1.0.0", 345 | "depth": 0, 346 | "source": "builtin", 347 | "dependencies": { 348 | "com.unity.modules.physics": "1.0.0", 349 | "com.unity.modules.terrain": "1.0.0" 350 | } 351 | }, 352 | "com.unity.modules.tilemap": { 353 | "version": "1.0.0", 354 | "depth": 0, 355 | "source": "builtin", 356 | "dependencies": { 357 | "com.unity.modules.physics2d": "1.0.0" 358 | } 359 | }, 360 | "com.unity.modules.ui": { 361 | "version": "1.0.0", 362 | "depth": 0, 363 | "source": "builtin", 364 | "dependencies": {} 365 | }, 366 | "com.unity.modules.uielements": { 367 | "version": "1.0.0", 368 | "depth": 0, 369 | "source": "builtin", 370 | "dependencies": { 371 | "com.unity.modules.ui": "1.0.0", 372 | "com.unity.modules.imgui": "1.0.0", 373 | "com.unity.modules.jsonserialize": "1.0.0", 374 | "com.unity.modules.uielementsnative": "1.0.0" 375 | } 376 | }, 377 | "com.unity.modules.uielementsnative": { 378 | "version": "1.0.0", 379 | "depth": 1, 380 | "source": "builtin", 381 | "dependencies": { 382 | "com.unity.modules.ui": "1.0.0", 383 | "com.unity.modules.imgui": "1.0.0", 384 | "com.unity.modules.jsonserialize": "1.0.0" 385 | } 386 | }, 387 | "com.unity.modules.umbra": { 388 | "version": "1.0.0", 389 | "depth": 0, 390 | "source": "builtin", 391 | "dependencies": {} 392 | }, 393 | "com.unity.modules.unityanalytics": { 394 | "version": "1.0.0", 395 | "depth": 0, 396 | "source": "builtin", 397 | "dependencies": { 398 | "com.unity.modules.unitywebrequest": "1.0.0", 399 | "com.unity.modules.jsonserialize": "1.0.0" 400 | } 401 | }, 402 | "com.unity.modules.unitywebrequest": { 403 | "version": "1.0.0", 404 | "depth": 0, 405 | "source": "builtin", 406 | "dependencies": {} 407 | }, 408 | "com.unity.modules.unitywebrequestassetbundle": { 409 | "version": "1.0.0", 410 | "depth": 0, 411 | "source": "builtin", 412 | "dependencies": { 413 | "com.unity.modules.assetbundle": "1.0.0", 414 | "com.unity.modules.unitywebrequest": "1.0.0" 415 | } 416 | }, 417 | "com.unity.modules.unitywebrequestaudio": { 418 | "version": "1.0.0", 419 | "depth": 0, 420 | "source": "builtin", 421 | "dependencies": { 422 | "com.unity.modules.unitywebrequest": "1.0.0", 423 | "com.unity.modules.audio": "1.0.0" 424 | } 425 | }, 426 | "com.unity.modules.unitywebrequesttexture": { 427 | "version": "1.0.0", 428 | "depth": 0, 429 | "source": "builtin", 430 | "dependencies": { 431 | "com.unity.modules.unitywebrequest": "1.0.0", 432 | "com.unity.modules.imageconversion": "1.0.0" 433 | } 434 | }, 435 | "com.unity.modules.unitywebrequestwww": { 436 | "version": "1.0.0", 437 | "depth": 0, 438 | "source": "builtin", 439 | "dependencies": { 440 | "com.unity.modules.unitywebrequest": "1.0.0", 441 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 442 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 443 | "com.unity.modules.audio": "1.0.0", 444 | "com.unity.modules.assetbundle": "1.0.0", 445 | "com.unity.modules.imageconversion": "1.0.0" 446 | } 447 | }, 448 | "com.unity.modules.vehicles": { 449 | "version": "1.0.0", 450 | "depth": 0, 451 | "source": "builtin", 452 | "dependencies": { 453 | "com.unity.modules.physics": "1.0.0" 454 | } 455 | }, 456 | "com.unity.modules.video": { 457 | "version": "1.0.0", 458 | "depth": 0, 459 | "source": "builtin", 460 | "dependencies": { 461 | "com.unity.modules.audio": "1.0.0", 462 | "com.unity.modules.ui": "1.0.0", 463 | "com.unity.modules.unitywebrequest": "1.0.0" 464 | } 465 | }, 466 | "com.unity.modules.vr": { 467 | "version": "1.0.0", 468 | "depth": 0, 469 | "source": "builtin", 470 | "dependencies": { 471 | "com.unity.modules.jsonserialize": "1.0.0", 472 | "com.unity.modules.physics": "1.0.0", 473 | "com.unity.modules.xr": "1.0.0" 474 | } 475 | }, 476 | "com.unity.modules.wind": { 477 | "version": "1.0.0", 478 | "depth": 0, 479 | "source": "builtin", 480 | "dependencies": {} 481 | }, 482 | "com.unity.modules.xr": { 483 | "version": "1.0.0", 484 | "depth": 0, 485 | "source": "builtin", 486 | "dependencies": { 487 | "com.unity.modules.physics": "1.0.0", 488 | "com.unity.modules.jsonserialize": "1.0.0", 489 | "com.unity.modules.subsystems": "1.0.0" 490 | } 491 | } 492 | } 493 | } 494 | -------------------------------------------------------------------------------- /Pic/EncryptLong_Benchmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiuOcean/ValueTypes_Memory_Encrypt/4291d442eb1e8933c1e9d3c2660702e37462c555/Pic/EncryptLong_Benchmark.png -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_DefaultMaxDepenetrationVelocity: 10 11 | m_SleepThreshold: 0.005 12 | m_DefaultContactOffset: 0.01 13 | m_DefaultSolverIterations: 6 14 | m_DefaultSolverVelocityIterations: 1 15 | m_QueriesHitBackfaces: 0 16 | m_QueriesHitTriggers: 1 17 | m_EnableAdaptiveForce: 0 18 | m_ClothInterCollisionDistance: 0.1 19 | m_ClothInterCollisionStiffness: 0.2 20 | m_ContactsGeneration: 1 21 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 22 | m_AutoSimulation: 1 23 | m_AutoSyncTransforms: 0 24 | m_ReuseCollisionCallbacks: 1 25 | m_ClothInterCollisionSettingsToggle: 0 26 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 27 | m_ContactPairsMode: 0 28 | m_BroadphaseType: 0 29 | m_WorldBounds: 30 | m_Center: {x: 0, y: 0, z: 0} 31 | m_Extent: {x: 250, y: 250, z: 250} 32 | m_WorldSubdivisions: 8 33 | m_FrictionType: 0 34 | m_EnableEnhancedDeterminism: 0 35 | m_EnableUnifiedHeightmaps: 1 36 | m_SolverType: 0 37 | m_DefaultMaxAngularSpeed: 50 38 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scenes/SampleScene.unity 10 | guid: 2cda990e2423bbf4892e6590ba056729 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_SerializationMode: 2 8 | m_LineEndingsForNewScripts: 0 9 | m_DefaultBehaviorMode: 1 10 | m_PrefabRegularEnvironment: {fileID: 0} 11 | m_PrefabUIEnvironment: {fileID: 0} 12 | m_SpritePackerMode: 4 13 | m_SpritePackerPaddingPower: 1 14 | m_EtcTextureCompressorBehavior: 1 15 | m_EtcTextureFastCompressor: 1 16 | m_EtcTextureNormalCompressor: 2 17 | m_EtcTextureBestCompressor: 4 18 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp 19 | m_ProjectGenerationRootNamespace: 20 | m_EnableTextureStreamingInEditMode: 1 21 | m_EnableTextureStreamingInPlayMode: 1 22 | m_AsyncShaderCompilation: 1 23 | m_CachingShaderPreprocessor: 1 24 | m_PrefabModeAllowAutoSave: 1 25 | m_EnterPlayModeOptionsEnabled: 0 26 | m_EnterPlayModeOptions: 3 27 | m_GameObjectNamingDigits: 1 28 | m_GameObjectNamingScheme: 0 29 | m_AssetNamingUsesSpace: 1 30 | m_UseLegacyProbeSampleCount: 0 31 | m_SerializeInlineMappingsOnOneLine: 1 32 | m_DisableCookiesInLightmapper: 1 33 | m_AssetPipelineMode: 1 34 | m_CacheServerMode: 0 35 | m_CacheServerEndpoint: 36 | m_CacheServerNamespacePrefix: default 37 | m_CacheServerEnableDownload: 1 38 | m_CacheServerEnableUpload: 1 39 | m_CacheServerEnableAuth: 0 40 | m_CacheServerEnableTls: 0 41 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_VideoShadersIncludeMode: 2 32 | m_AlwaysIncludedShaders: 33 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 40 | m_PreloadedShaders: [] 41 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | m_DefaultRenderingLayerMask: 1 64 | m_LogWhenShaderIsCompiled: 0 65 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | - serializedVersion: 3 297 | m_Name: Enable Debug Button 1 298 | descriptiveName: 299 | descriptiveNegativeName: 300 | negativeButton: 301 | positiveButton: left ctrl 302 | altNegativeButton: 303 | altPositiveButton: joystick button 8 304 | gravity: 0 305 | dead: 0 306 | sensitivity: 0 307 | snap: 0 308 | invert: 0 309 | type: 0 310 | axis: 0 311 | joyNum: 0 312 | - serializedVersion: 3 313 | m_Name: Enable Debug Button 2 314 | descriptiveName: 315 | descriptiveNegativeName: 316 | negativeButton: 317 | positiveButton: backspace 318 | altNegativeButton: 319 | altPositiveButton: joystick button 9 320 | gravity: 0 321 | dead: 0 322 | sensitivity: 0 323 | snap: 0 324 | invert: 0 325 | type: 0 326 | axis: 0 327 | joyNum: 0 328 | - serializedVersion: 3 329 | m_Name: Debug Reset 330 | descriptiveName: 331 | descriptiveNegativeName: 332 | negativeButton: 333 | positiveButton: left alt 334 | altNegativeButton: 335 | altPositiveButton: joystick button 1 336 | gravity: 0 337 | dead: 0 338 | sensitivity: 0 339 | snap: 0 340 | invert: 0 341 | type: 0 342 | axis: 0 343 | joyNum: 0 344 | - serializedVersion: 3 345 | m_Name: Debug Next 346 | descriptiveName: 347 | descriptiveNegativeName: 348 | negativeButton: 349 | positiveButton: page down 350 | altNegativeButton: 351 | altPositiveButton: joystick button 5 352 | gravity: 0 353 | dead: 0 354 | sensitivity: 0 355 | snap: 0 356 | invert: 0 357 | type: 0 358 | axis: 0 359 | joyNum: 0 360 | - serializedVersion: 3 361 | m_Name: Debug Previous 362 | descriptiveName: 363 | descriptiveNegativeName: 364 | negativeButton: 365 | positiveButton: page up 366 | altNegativeButton: 367 | altPositiveButton: joystick button 4 368 | gravity: 0 369 | dead: 0 370 | sensitivity: 0 371 | snap: 0 372 | invert: 0 373 | type: 0 374 | axis: 0 375 | joyNum: 0 376 | - serializedVersion: 3 377 | m_Name: Debug Validate 378 | descriptiveName: 379 | descriptiveNegativeName: 380 | negativeButton: 381 | positiveButton: return 382 | altNegativeButton: 383 | altPositiveButton: joystick button 0 384 | gravity: 0 385 | dead: 0 386 | sensitivity: 0 387 | snap: 0 388 | invert: 0 389 | type: 0 390 | axis: 0 391 | joyNum: 0 392 | - serializedVersion: 3 393 | m_Name: Debug Persistent 394 | descriptiveName: 395 | descriptiveNegativeName: 396 | negativeButton: 397 | positiveButton: right shift 398 | altNegativeButton: 399 | altPositiveButton: joystick button 2 400 | gravity: 0 401 | dead: 0 402 | sensitivity: 0 403 | snap: 0 404 | invert: 0 405 | type: 0 406 | axis: 0 407 | joyNum: 0 408 | - serializedVersion: 3 409 | m_Name: Debug Multiplier 410 | descriptiveName: 411 | descriptiveNegativeName: 412 | negativeButton: 413 | positiveButton: left shift 414 | altNegativeButton: 415 | altPositiveButton: joystick button 3 416 | gravity: 0 417 | dead: 0 418 | sensitivity: 0 419 | snap: 0 420 | invert: 0 421 | type: 0 422 | axis: 0 423 | joyNum: 0 424 | - serializedVersion: 3 425 | m_Name: Debug Horizontal 426 | descriptiveName: 427 | descriptiveNegativeName: 428 | negativeButton: left 429 | positiveButton: right 430 | altNegativeButton: 431 | altPositiveButton: 432 | gravity: 1000 433 | dead: 0.001 434 | sensitivity: 1000 435 | snap: 0 436 | invert: 0 437 | type: 0 438 | axis: 0 439 | joyNum: 0 440 | - serializedVersion: 3 441 | m_Name: Debug Vertical 442 | descriptiveName: 443 | descriptiveNegativeName: 444 | negativeButton: down 445 | positiveButton: up 446 | altNegativeButton: 447 | altPositiveButton: 448 | gravity: 1000 449 | dead: 0.001 450 | sensitivity: 1000 451 | snap: 0 452 | invert: 0 453 | type: 0 454 | axis: 0 455 | joyNum: 0 456 | - serializedVersion: 3 457 | m_Name: Debug Vertical 458 | descriptiveName: 459 | descriptiveNegativeName: 460 | negativeButton: down 461 | positiveButton: up 462 | altNegativeButton: 463 | altPositiveButton: 464 | gravity: 1000 465 | dead: 0.001 466 | sensitivity: 1000 467 | snap: 0 468 | invert: 0 469 | type: 2 470 | axis: 6 471 | joyNum: 0 472 | - serializedVersion: 3 473 | m_Name: Debug Horizontal 474 | descriptiveName: 475 | descriptiveNegativeName: 476 | negativeButton: left 477 | positiveButton: right 478 | altNegativeButton: 479 | altPositiveButton: 480 | gravity: 1000 481 | dead: 0.001 482 | sensitivity: 1000 483 | snap: 0 484 | invert: 0 485 | type: 2 486 | axis: 5 487 | joyNum: 0 488 | -------------------------------------------------------------------------------- /ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | maxJobWorkers: 0 89 | preserveTilesOutsideBounds: 0 90 | debug: 91 | m_Flags: 0 92 | m_SettingNames: 93 | - Humanoid 94 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreReleasePackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | m_SeeAllPackageVersions: 0 20 | oneTimeWarningShown: 0 21 | m_Registries: 22 | - m_Id: main 23 | m_Name: 24 | m_Url: https://packages.unity.com 25 | m_Scopes: [] 26 | m_IsDefault: 1 27 | m_Capabilities: 7 28 | m_UserSelectedRegistryName: 29 | m_UserAddingNewScopedRegistry: 0 30 | m_RegistryInfoDraft: 31 | m_ErrorMessage: 32 | m_Original: 33 | m_Id: 34 | m_Name: 35 | m_Url: 36 | m_Scopes: [] 37 | m_IsDefault: 0 38 | m_Capabilities: 0 39 | m_Modified: 0 40 | m_Name: 41 | m_Url: 42 | m_Scopes: 43 | - 44 | m_SelectedScopeIndex: 0 45 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_SimulationMode: 0 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 23 7 | productGUID: 75dd7bdb8b5e5482cb379b288559cb9f 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: Nireus.Encrypt 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1920 46 | defaultScreenHeight: 1080 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | mipStripping: 0 53 | numberOfMipsStripped: 0 54 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 55 | iosShowActivityIndicatorOnLoading: -1 56 | androidShowActivityIndicatorOnLoading: -1 57 | iosUseCustomAppBackgroundBehavior: 0 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidStartInFullscreen: 1 68 | androidRenderOutsideSafeArea: 1 69 | androidUseSwappy: 1 70 | androidBlitType: 0 71 | androidResizableWindow: 0 72 | androidDefaultWindowWidth: 1920 73 | androidDefaultWindowHeight: 1080 74 | androidMinimumWindowWidth: 400 75 | androidMinimumWindowHeight: 300 76 | androidFullscreenMode: 1 77 | defaultIsNativeResolution: 1 78 | macRetinaSupport: 1 79 | runInBackground: 0 80 | captureSingleScreen: 0 81 | muteOtherAudioSources: 0 82 | Prepare IOS For Recording: 0 83 | Force IOS Speakers When Recording: 0 84 | deferSystemGesturesMode: 0 85 | hideHomeButton: 0 86 | submitAnalytics: 1 87 | usePlayerLog: 1 88 | bakeCollisionMeshes: 0 89 | forceSingleInstance: 0 90 | useFlipModelSwapchain: 1 91 | resizableWindow: 0 92 | useMacAppStoreValidation: 0 93 | macAppStoreCategory: public.app-category.games 94 | gpuSkinning: 0 95 | xboxPIXTextureCapture: 0 96 | xboxEnableAvatar: 0 97 | xboxEnableKinect: 0 98 | xboxEnableKinectAutoTracking: 0 99 | xboxEnableFitness: 0 100 | visibleInBackground: 1 101 | allowFullscreenSwitch: 1 102 | fullscreenMode: 1 103 | xboxSpeechDB: 0 104 | xboxEnableHeadOrientation: 0 105 | xboxEnableGuest: 0 106 | xboxEnablePIXSampling: 0 107 | metalFramebufferOnly: 0 108 | xboxOneResolution: 0 109 | xboxOneSResolution: 0 110 | xboxOneXResolution: 3 111 | xboxOneMonoLoggingLevel: 0 112 | xboxOneLoggingLevel: 1 113 | xboxOneDisableEsram: 0 114 | xboxOneEnableTypeOptimization: 0 115 | xboxOnePresentImmediateThreshold: 0 116 | switchQueueCommandMemory: 1048576 117 | switchQueueControlMemory: 16384 118 | switchQueueComputeMemory: 262144 119 | switchNVNShaderPoolsGranularity: 33554432 120 | switchNVNDefaultPoolsGranularity: 16777216 121 | switchNVNOtherPoolsGranularity: 16777216 122 | switchNVNMaxPublicTextureIDCount: 0 123 | switchNVNMaxPublicSamplerIDCount: 0 124 | stadiaPresentMode: 0 125 | stadiaTargetFramerate: 0 126 | vulkanNumSwapchainBuffers: 3 127 | vulkanEnableSetSRGBWrite: 0 128 | vulkanEnablePreTransform: 0 129 | vulkanEnableLateAcquireNextImage: 0 130 | vulkanEnableCommandBufferRecycling: 1 131 | m_SupportedAspectRatios: 132 | 4:3: 1 133 | 5:4: 1 134 | 16:10: 1 135 | 16:9: 1 136 | Others: 1 137 | bundleVersion: 1.0 138 | preloadedAssets: [] 139 | metroInputSource: 0 140 | wsaTransparentSwapchain: 0 141 | m_HolographicPauseOnTrackingLoss: 1 142 | xboxOneDisableKinectGpuReservation: 1 143 | xboxOneEnable7thCore: 1 144 | vrSettings: 145 | enable360StereoCapture: 0 146 | isWsaHolographicRemotingEnabled: 0 147 | enableFrameTimingStats: 0 148 | enableOpenGLProfilerGPURecorders: 1 149 | useHDRDisplay: 0 150 | D3DHDRBitDepth: 0 151 | m_ColorGamuts: 00000000 152 | targetPixelDensity: 30 153 | resolutionScalingMode: 0 154 | resetResolutionOnWindowResize: 0 155 | androidSupportedAspectRatio: 1 156 | androidMaxAspectRatio: 2.1 157 | applicationIdentifier: 158 | Standalone: com.DefaultCompany.2DProject 159 | buildNumber: 160 | Standalone: 0 161 | iPhone: 0 162 | tvOS: 0 163 | overrideDefaultApplicationIdentifier: 1 164 | AndroidBundleVersionCode: 1 165 | AndroidMinSdkVersion: 22 166 | AndroidTargetSdkVersion: 0 167 | AndroidPreferredInstallLocation: 1 168 | aotOptions: 169 | stripEngineCode: 1 170 | iPhoneStrippingLevel: 0 171 | iPhoneScriptCallOptimization: 0 172 | ForceInternetPermission: 0 173 | ForceSDCardPermission: 0 174 | CreateWallpaper: 0 175 | APKExpansionFiles: 0 176 | keepLoadedShadersAlive: 0 177 | StripUnusedMeshComponents: 0 178 | VertexChannelCompressionMask: 4054 179 | iPhoneSdkVersion: 988 180 | iOSTargetOSVersionString: 11.0 181 | tvOSSdkVersion: 0 182 | tvOSRequireExtendedGameController: 0 183 | tvOSTargetOSVersionString: 11.0 184 | uIPrerenderedIcon: 0 185 | uIRequiresPersistentWiFi: 0 186 | uIRequiresFullScreen: 1 187 | uIStatusBarHidden: 1 188 | uIExitOnSuspend: 0 189 | uIStatusBarStyle: 0 190 | appleTVSplashScreen: {fileID: 0} 191 | appleTVSplashScreen2x: {fileID: 0} 192 | tvOSSmallIconLayers: [] 193 | tvOSSmallIconLayers2x: [] 194 | tvOSLargeIconLayers: [] 195 | tvOSLargeIconLayers2x: [] 196 | tvOSTopShelfImageLayers: [] 197 | tvOSTopShelfImageLayers2x: [] 198 | tvOSTopShelfImageWideLayers: [] 199 | tvOSTopShelfImageWideLayers2x: [] 200 | iOSLaunchScreenType: 0 201 | iOSLaunchScreenPortrait: {fileID: 0} 202 | iOSLaunchScreenLandscape: {fileID: 0} 203 | iOSLaunchScreenBackgroundColor: 204 | serializedVersion: 2 205 | rgba: 0 206 | iOSLaunchScreenFillPct: 100 207 | iOSLaunchScreenSize: 100 208 | iOSLaunchScreenCustomXibPath: 209 | iOSLaunchScreeniPadType: 0 210 | iOSLaunchScreeniPadImage: {fileID: 0} 211 | iOSLaunchScreeniPadBackgroundColor: 212 | serializedVersion: 2 213 | rgba: 0 214 | iOSLaunchScreeniPadFillPct: 100 215 | iOSLaunchScreeniPadSize: 100 216 | iOSLaunchScreeniPadCustomXibPath: 217 | iOSLaunchScreenCustomStoryboardPath: 218 | iOSLaunchScreeniPadCustomStoryboardPath: 219 | iOSDeviceRequirements: [] 220 | iOSURLSchemes: [] 221 | macOSURLSchemes: [] 222 | iOSBackgroundModes: 0 223 | iOSMetalForceHardShadows: 0 224 | metalEditorSupport: 1 225 | metalAPIValidation: 1 226 | iOSRenderExtraFrameOnPause: 0 227 | iosCopyPluginsCodeInsteadOfSymlink: 0 228 | appleDeveloperTeamID: 229 | iOSManualSigningProvisioningProfileID: 230 | tvOSManualSigningProvisioningProfileID: 231 | iOSManualSigningProvisioningProfileType: 0 232 | tvOSManualSigningProvisioningProfileType: 0 233 | appleEnableAutomaticSigning: 0 234 | iOSRequireARKit: 0 235 | iOSAutomaticallyDetectAndAddCapabilities: 1 236 | appleEnableProMotion: 0 237 | shaderPrecisionModel: 0 238 | clonedFromGUID: 10ad67313f4034357812315f3c407484 239 | templatePackageId: com.unity.template.2d@6.1.1 240 | templateDefaultScene: Assets/Scenes/SampleScene.unity 241 | useCustomMainManifest: 0 242 | useCustomLauncherManifest: 0 243 | useCustomMainGradleTemplate: 0 244 | useCustomLauncherGradleManifest: 0 245 | useCustomBaseGradleTemplate: 0 246 | useCustomGradlePropertiesTemplate: 0 247 | useCustomProguardFile: 0 248 | AndroidTargetArchitectures: 1 249 | AndroidTargetDevices: 0 250 | AndroidSplashScreenScale: 0 251 | androidSplashScreen: {fileID: 0} 252 | AndroidKeystoreName: 253 | AndroidKeyaliasName: 254 | AndroidBuildApkPerCpuArchitecture: 0 255 | AndroidTVCompatibility: 0 256 | AndroidIsGame: 1 257 | AndroidEnableTango: 0 258 | androidEnableBanner: 1 259 | androidUseLowAccuracyLocation: 0 260 | androidUseCustomKeystore: 0 261 | m_AndroidBanners: 262 | - width: 320 263 | height: 180 264 | banner: {fileID: 0} 265 | androidGamepadSupportLevel: 0 266 | chromeosInputEmulation: 1 267 | AndroidMinifyWithR8: 0 268 | AndroidMinifyRelease: 0 269 | AndroidMinifyDebug: 0 270 | AndroidValidateAppBundleSize: 1 271 | AndroidAppBundleSizeToValidate: 150 272 | m_BuildTargetIcons: [] 273 | m_BuildTargetPlatformIcons: 274 | - m_BuildTarget: iPhone 275 | m_Icons: 276 | - m_Textures: [] 277 | m_Width: 180 278 | m_Height: 180 279 | m_Kind: 0 280 | m_SubKind: iPhone 281 | - m_Textures: [] 282 | m_Width: 120 283 | m_Height: 120 284 | m_Kind: 0 285 | m_SubKind: iPhone 286 | - m_Textures: [] 287 | m_Width: 167 288 | m_Height: 167 289 | m_Kind: 0 290 | m_SubKind: iPad 291 | - m_Textures: [] 292 | m_Width: 152 293 | m_Height: 152 294 | m_Kind: 0 295 | m_SubKind: iPad 296 | - m_Textures: [] 297 | m_Width: 76 298 | m_Height: 76 299 | m_Kind: 0 300 | m_SubKind: iPad 301 | - m_Textures: [] 302 | m_Width: 120 303 | m_Height: 120 304 | m_Kind: 3 305 | m_SubKind: iPhone 306 | - m_Textures: [] 307 | m_Width: 80 308 | m_Height: 80 309 | m_Kind: 3 310 | m_SubKind: iPhone 311 | - m_Textures: [] 312 | m_Width: 80 313 | m_Height: 80 314 | m_Kind: 3 315 | m_SubKind: iPad 316 | - m_Textures: [] 317 | m_Width: 40 318 | m_Height: 40 319 | m_Kind: 3 320 | m_SubKind: iPad 321 | - m_Textures: [] 322 | m_Width: 87 323 | m_Height: 87 324 | m_Kind: 1 325 | m_SubKind: iPhone 326 | - m_Textures: [] 327 | m_Width: 58 328 | m_Height: 58 329 | m_Kind: 1 330 | m_SubKind: iPhone 331 | - m_Textures: [] 332 | m_Width: 29 333 | m_Height: 29 334 | m_Kind: 1 335 | m_SubKind: iPhone 336 | - m_Textures: [] 337 | m_Width: 58 338 | m_Height: 58 339 | m_Kind: 1 340 | m_SubKind: iPad 341 | - m_Textures: [] 342 | m_Width: 29 343 | m_Height: 29 344 | m_Kind: 1 345 | m_SubKind: iPad 346 | - m_Textures: [] 347 | m_Width: 60 348 | m_Height: 60 349 | m_Kind: 2 350 | m_SubKind: iPhone 351 | - m_Textures: [] 352 | m_Width: 40 353 | m_Height: 40 354 | m_Kind: 2 355 | m_SubKind: iPhone 356 | - m_Textures: [] 357 | m_Width: 40 358 | m_Height: 40 359 | m_Kind: 2 360 | m_SubKind: iPad 361 | - m_Textures: [] 362 | m_Width: 20 363 | m_Height: 20 364 | m_Kind: 2 365 | m_SubKind: iPad 366 | - m_Textures: [] 367 | m_Width: 1024 368 | m_Height: 1024 369 | m_Kind: 4 370 | m_SubKind: App Store 371 | - m_BuildTarget: Android 372 | m_Icons: 373 | - m_Textures: [] 374 | m_Width: 432 375 | m_Height: 432 376 | m_Kind: 2 377 | m_SubKind: 378 | - m_Textures: [] 379 | m_Width: 324 380 | m_Height: 324 381 | m_Kind: 2 382 | m_SubKind: 383 | - m_Textures: [] 384 | m_Width: 216 385 | m_Height: 216 386 | m_Kind: 2 387 | m_SubKind: 388 | - m_Textures: [] 389 | m_Width: 162 390 | m_Height: 162 391 | m_Kind: 2 392 | m_SubKind: 393 | - m_Textures: [] 394 | m_Width: 108 395 | m_Height: 108 396 | m_Kind: 2 397 | m_SubKind: 398 | - m_Textures: [] 399 | m_Width: 81 400 | m_Height: 81 401 | m_Kind: 2 402 | m_SubKind: 403 | - m_Textures: [] 404 | m_Width: 192 405 | m_Height: 192 406 | m_Kind: 1 407 | m_SubKind: 408 | - m_Textures: [] 409 | m_Width: 144 410 | m_Height: 144 411 | m_Kind: 1 412 | m_SubKind: 413 | - m_Textures: [] 414 | m_Width: 96 415 | m_Height: 96 416 | m_Kind: 1 417 | m_SubKind: 418 | - m_Textures: [] 419 | m_Width: 72 420 | m_Height: 72 421 | m_Kind: 1 422 | m_SubKind: 423 | - m_Textures: [] 424 | m_Width: 48 425 | m_Height: 48 426 | m_Kind: 1 427 | m_SubKind: 428 | - m_Textures: [] 429 | m_Width: 36 430 | m_Height: 36 431 | m_Kind: 1 432 | m_SubKind: 433 | - m_Textures: [] 434 | m_Width: 192 435 | m_Height: 192 436 | m_Kind: 0 437 | m_SubKind: 438 | - m_Textures: [] 439 | m_Width: 144 440 | m_Height: 144 441 | m_Kind: 0 442 | m_SubKind: 443 | - m_Textures: [] 444 | m_Width: 96 445 | m_Height: 96 446 | m_Kind: 0 447 | m_SubKind: 448 | - m_Textures: [] 449 | m_Width: 72 450 | m_Height: 72 451 | m_Kind: 0 452 | m_SubKind: 453 | - m_Textures: [] 454 | m_Width: 48 455 | m_Height: 48 456 | m_Kind: 0 457 | m_SubKind: 458 | - m_Textures: [] 459 | m_Width: 36 460 | m_Height: 36 461 | m_Kind: 0 462 | m_SubKind: 463 | m_BuildTargetBatching: [] 464 | m_BuildTargetGraphicsJobs: 465 | - m_BuildTarget: MacStandaloneSupport 466 | m_GraphicsJobs: 0 467 | - m_BuildTarget: Switch 468 | m_GraphicsJobs: 0 469 | - m_BuildTarget: MetroSupport 470 | m_GraphicsJobs: 0 471 | - m_BuildTarget: AppleTVSupport 472 | m_GraphicsJobs: 0 473 | - m_BuildTarget: BJMSupport 474 | m_GraphicsJobs: 0 475 | - m_BuildTarget: LinuxStandaloneSupport 476 | m_GraphicsJobs: 0 477 | - m_BuildTarget: PS4Player 478 | m_GraphicsJobs: 0 479 | - m_BuildTarget: iOSSupport 480 | m_GraphicsJobs: 0 481 | - m_BuildTarget: WindowsStandaloneSupport 482 | m_GraphicsJobs: 0 483 | - m_BuildTarget: XboxOnePlayer 484 | m_GraphicsJobs: 0 485 | - m_BuildTarget: LuminSupport 486 | m_GraphicsJobs: 0 487 | - m_BuildTarget: AndroidPlayer 488 | m_GraphicsJobs: 0 489 | - m_BuildTarget: WebGLSupport 490 | m_GraphicsJobs: 0 491 | m_BuildTargetGraphicsJobMode: [] 492 | m_BuildTargetGraphicsAPIs: 493 | - m_BuildTarget: AndroidPlayer 494 | m_APIs: 150000000b000000 495 | m_Automatic: 1 496 | - m_BuildTarget: iOSSupport 497 | m_APIs: 10000000 498 | m_Automatic: 1 499 | m_BuildTargetVRSettings: [] 500 | openGLRequireES31: 0 501 | openGLRequireES31AEP: 0 502 | openGLRequireES32: 0 503 | m_TemplateCustomTags: {} 504 | mobileMTRendering: 505 | Android: 1 506 | iPhone: 1 507 | tvOS: 1 508 | m_BuildTargetGroupLightmapEncodingQuality: [] 509 | m_BuildTargetGroupLightmapSettings: [] 510 | m_BuildTargetNormalMapEncoding: [] 511 | m_BuildTargetDefaultTextureCompressionFormat: 512 | - m_BuildTarget: Android 513 | m_Format: 3 514 | playModeTestRunnerEnabled: 0 515 | runPlayModeTestAsEditModeTest: 0 516 | actionOnDotNetUnhandledException: 1 517 | enableInternalProfiler: 0 518 | logObjCUncaughtExceptions: 1 519 | enableCrashReportAPI: 0 520 | cameraUsageDescription: 521 | locationUsageDescription: 522 | microphoneUsageDescription: 523 | bluetoothUsageDescription: 524 | switchNMETAOverride: 525 | switchNetLibKey: 526 | switchSocketMemoryPoolSize: 6144 527 | switchSocketAllocatorPoolSize: 128 528 | switchSocketConcurrencyLimit: 14 529 | switchScreenResolutionBehavior: 2 530 | switchUseCPUProfiler: 0 531 | switchUseGOLDLinker: 0 532 | switchLTOSetting: 0 533 | switchApplicationID: 0x01004b9000490000 534 | switchNSODependencies: 535 | switchTitleNames_0: 536 | switchTitleNames_1: 537 | switchTitleNames_2: 538 | switchTitleNames_3: 539 | switchTitleNames_4: 540 | switchTitleNames_5: 541 | switchTitleNames_6: 542 | switchTitleNames_7: 543 | switchTitleNames_8: 544 | switchTitleNames_9: 545 | switchTitleNames_10: 546 | switchTitleNames_11: 547 | switchTitleNames_12: 548 | switchTitleNames_13: 549 | switchTitleNames_14: 550 | switchTitleNames_15: 551 | switchPublisherNames_0: 552 | switchPublisherNames_1: 553 | switchPublisherNames_2: 554 | switchPublisherNames_3: 555 | switchPublisherNames_4: 556 | switchPublisherNames_5: 557 | switchPublisherNames_6: 558 | switchPublisherNames_7: 559 | switchPublisherNames_8: 560 | switchPublisherNames_9: 561 | switchPublisherNames_10: 562 | switchPublisherNames_11: 563 | switchPublisherNames_12: 564 | switchPublisherNames_13: 565 | switchPublisherNames_14: 566 | switchPublisherNames_15: 567 | switchIcons_0: {fileID: 0} 568 | switchIcons_1: {fileID: 0} 569 | switchIcons_2: {fileID: 0} 570 | switchIcons_3: {fileID: 0} 571 | switchIcons_4: {fileID: 0} 572 | switchIcons_5: {fileID: 0} 573 | switchIcons_6: {fileID: 0} 574 | switchIcons_7: {fileID: 0} 575 | switchIcons_8: {fileID: 0} 576 | switchIcons_9: {fileID: 0} 577 | switchIcons_10: {fileID: 0} 578 | switchIcons_11: {fileID: 0} 579 | switchIcons_12: {fileID: 0} 580 | switchIcons_13: {fileID: 0} 581 | switchIcons_14: {fileID: 0} 582 | switchIcons_15: {fileID: 0} 583 | switchSmallIcons_0: {fileID: 0} 584 | switchSmallIcons_1: {fileID: 0} 585 | switchSmallIcons_2: {fileID: 0} 586 | switchSmallIcons_3: {fileID: 0} 587 | switchSmallIcons_4: {fileID: 0} 588 | switchSmallIcons_5: {fileID: 0} 589 | switchSmallIcons_6: {fileID: 0} 590 | switchSmallIcons_7: {fileID: 0} 591 | switchSmallIcons_8: {fileID: 0} 592 | switchSmallIcons_9: {fileID: 0} 593 | switchSmallIcons_10: {fileID: 0} 594 | switchSmallIcons_11: {fileID: 0} 595 | switchSmallIcons_12: {fileID: 0} 596 | switchSmallIcons_13: {fileID: 0} 597 | switchSmallIcons_14: {fileID: 0} 598 | switchSmallIcons_15: {fileID: 0} 599 | switchManualHTML: 600 | switchAccessibleURLs: 601 | switchLegalInformation: 602 | switchMainThreadStackSize: 1048576 603 | switchPresenceGroupId: 604 | switchLogoHandling: 0 605 | switchReleaseVersion: 0 606 | switchDisplayVersion: 1.0.0 607 | switchStartupUserAccount: 0 608 | switchTouchScreenUsage: 0 609 | switchSupportedLanguagesMask: 0 610 | switchLogoType: 0 611 | switchApplicationErrorCodeCategory: 612 | switchUserAccountSaveDataSize: 0 613 | switchUserAccountSaveDataJournalSize: 0 614 | switchApplicationAttribute: 0 615 | switchCardSpecSize: -1 616 | switchCardSpecClock: -1 617 | switchRatingsMask: 0 618 | switchRatingsInt_0: 0 619 | switchRatingsInt_1: 0 620 | switchRatingsInt_2: 0 621 | switchRatingsInt_3: 0 622 | switchRatingsInt_4: 0 623 | switchRatingsInt_5: 0 624 | switchRatingsInt_6: 0 625 | switchRatingsInt_7: 0 626 | switchRatingsInt_8: 0 627 | switchRatingsInt_9: 0 628 | switchRatingsInt_10: 0 629 | switchRatingsInt_11: 0 630 | switchRatingsInt_12: 0 631 | switchLocalCommunicationIds_0: 632 | switchLocalCommunicationIds_1: 633 | switchLocalCommunicationIds_2: 634 | switchLocalCommunicationIds_3: 635 | switchLocalCommunicationIds_4: 636 | switchLocalCommunicationIds_5: 637 | switchLocalCommunicationIds_6: 638 | switchLocalCommunicationIds_7: 639 | switchParentalControl: 0 640 | switchAllowsScreenshot: 1 641 | switchAllowsVideoCapturing: 1 642 | switchAllowsRuntimeAddOnContentInstall: 0 643 | switchDataLossConfirmation: 0 644 | switchUserAccountLockEnabled: 0 645 | switchSystemResourceMemory: 16777216 646 | switchSupportedNpadStyles: 22 647 | switchNativeFsCacheSize: 32 648 | switchIsHoldTypeHorizontal: 0 649 | switchSupportedNpadCount: 8 650 | switchSocketConfigEnabled: 0 651 | switchTcpInitialSendBufferSize: 32 652 | switchTcpInitialReceiveBufferSize: 64 653 | switchTcpAutoSendBufferSizeMax: 256 654 | switchTcpAutoReceiveBufferSizeMax: 256 655 | switchUdpSendBufferSize: 9 656 | switchUdpReceiveBufferSize: 42 657 | switchSocketBufferEfficiency: 4 658 | switchSocketInitializeEnabled: 1 659 | switchNetworkInterfaceManagerInitializeEnabled: 1 660 | switchPlayerConnectionEnabled: 1 661 | switchUseNewStyleFilepaths: 0 662 | switchUseMicroSleepForYield: 1 663 | switchEnableRamDiskSupport: 0 664 | switchMicroSleepForYieldTime: 25 665 | switchRamDiskSpaceSize: 12 666 | ps4NPAgeRating: 12 667 | ps4NPTitleSecret: 668 | ps4NPTrophyPackPath: 669 | ps4ParentalLevel: 11 670 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 671 | ps4Category: 0 672 | ps4MasterVersion: 01.00 673 | ps4AppVersion: 01.00 674 | ps4AppType: 0 675 | ps4ParamSfxPath: 676 | ps4VideoOutPixelFormat: 0 677 | ps4VideoOutInitialWidth: 1920 678 | ps4VideoOutBaseModeInitialWidth: 1920 679 | ps4VideoOutReprojectionRate: 60 680 | ps4PronunciationXMLPath: 681 | ps4PronunciationSIGPath: 682 | ps4BackgroundImagePath: 683 | ps4StartupImagePath: 684 | ps4StartupImagesFolder: 685 | ps4IconImagesFolder: 686 | ps4SaveDataImagePath: 687 | ps4SdkOverride: 688 | ps4BGMPath: 689 | ps4ShareFilePath: 690 | ps4ShareOverlayImagePath: 691 | ps4PrivacyGuardImagePath: 692 | ps4ExtraSceSysFile: 693 | ps4NPtitleDatPath: 694 | ps4RemotePlayKeyAssignment: -1 695 | ps4RemotePlayKeyMappingDir: 696 | ps4PlayTogetherPlayerCount: 0 697 | ps4EnterButtonAssignment: 2 698 | ps4ApplicationParam1: 0 699 | ps4ApplicationParam2: 0 700 | ps4ApplicationParam3: 0 701 | ps4ApplicationParam4: 0 702 | ps4DownloadDataSize: 0 703 | ps4GarlicHeapSize: 2048 704 | ps4ProGarlicHeapSize: 2560 705 | playerPrefsMaxSize: 32768 706 | ps4Passcode: bi9UOuSpM2Tlh01vOzwvSikHFswuzleh 707 | ps4pnSessions: 1 708 | ps4pnPresence: 1 709 | ps4pnFriends: 1 710 | ps4pnGameCustomData: 1 711 | playerPrefsSupport: 0 712 | enableApplicationExit: 0 713 | resetTempFolder: 1 714 | restrictedAudioUsageRights: 0 715 | ps4UseResolutionFallback: 0 716 | ps4ReprojectionSupport: 0 717 | ps4UseAudio3dBackend: 0 718 | ps4UseLowGarlicFragmentationMode: 1 719 | ps4SocialScreenEnabled: 0 720 | ps4ScriptOptimizationLevel: 2 721 | ps4Audio3dVirtualSpeakerCount: 14 722 | ps4attribCpuUsage: 0 723 | ps4PatchPkgPath: 724 | ps4PatchLatestPkgPath: 725 | ps4PatchChangeinfoPath: 726 | ps4PatchDayOne: 0 727 | ps4attribUserManagement: 0 728 | ps4attribMoveSupport: 0 729 | ps4attrib3DSupport: 0 730 | ps4attribShareSupport: 0 731 | ps4attribExclusiveVR: 0 732 | ps4disableAutoHideSplash: 0 733 | ps4videoRecordingFeaturesUsed: 0 734 | ps4contentSearchFeaturesUsed: 0 735 | ps4CompatibilityPS5: 0 736 | ps4AllowPS5Detection: 0 737 | ps4GPU800MHz: 1 738 | ps4attribEyeToEyeDistanceSettingVR: 0 739 | ps4IncludedModules: [] 740 | ps4attribVROutputEnabled: 0 741 | monoEnv: 742 | splashScreenBackgroundSourceLandscape: {fileID: 0} 743 | splashScreenBackgroundSourcePortrait: {fileID: 0} 744 | blurSplashScreenBackground: 1 745 | spritePackerPolicy: 746 | webGLMemorySize: 32 747 | webGLExceptionSupport: 1 748 | webGLNameFilesAsHashes: 0 749 | webGLDataCaching: 1 750 | webGLDebugSymbols: 0 751 | webGLEmscriptenArgs: 752 | webGLModulesDirectory: 753 | webGLTemplate: APPLICATION:Default 754 | webGLAnalyzeBuildSize: 0 755 | webGLUseEmbeddedResources: 0 756 | webGLCompressionFormat: 0 757 | webGLWasmArithmeticExceptions: 0 758 | webGLLinkerTarget: 1 759 | webGLThreadsSupport: 0 760 | webGLDecompressionFallback: 0 761 | scriptingDefineSymbols: {} 762 | additionalCompilerArguments: {} 763 | platformArchitecture: {} 764 | scriptingBackend: {} 765 | il2cppCompilerConfiguration: {} 766 | managedStrippingLevel: {} 767 | incrementalIl2cppBuild: {} 768 | suppressCommonWarnings: 1 769 | allowUnsafeCode: 0 770 | useDeterministicCompilation: 1 771 | enableRoslynAnalyzers: 1 772 | additionalIl2CppArgs: 773 | scriptingRuntimeVersion: 1 774 | gcIncremental: 1 775 | assemblyVersionValidation: 1 776 | gcWBarrierValidation: 0 777 | apiCompatibilityLevelPerPlatform: {} 778 | m_RenderingPath: 1 779 | m_MobileRenderingPath: 1 780 | metroPackageName: 2D_BuiltInRenderer 781 | metroPackageVersion: 782 | metroCertificatePath: 783 | metroCertificatePassword: 784 | metroCertificateSubject: 785 | metroCertificateIssuer: 786 | metroCertificateNotAfter: 0000000000000000 787 | metroApplicationDescription: 2D_BuiltInRenderer 788 | wsaImages: {} 789 | metroTileShortName: 790 | metroTileShowName: 0 791 | metroMediumTileShowName: 0 792 | metroLargeTileShowName: 0 793 | metroWideTileShowName: 0 794 | metroSupportStreamingInstall: 0 795 | metroLastRequiredScene: 0 796 | metroDefaultTileSize: 1 797 | metroTileForegroundText: 2 798 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 799 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 800 | metroSplashScreenUseBackgroundColor: 0 801 | platformCapabilities: {} 802 | metroTargetDeviceFamilies: {} 803 | metroFTAName: 804 | metroFTAFileTypes: [] 805 | metroProtocolName: 806 | vcxProjDefaultLanguage: 807 | XboxOneProductId: 808 | XboxOneUpdateKey: 809 | XboxOneSandboxId: 810 | XboxOneContentId: 811 | XboxOneTitleId: 812 | XboxOneSCId: 813 | XboxOneGameOsOverridePath: 814 | XboxOnePackagingOverridePath: 815 | XboxOneAppManifestOverridePath: 816 | XboxOneVersion: 1.0.0.0 817 | XboxOnePackageEncryption: 0 818 | XboxOnePackageUpdateGranularity: 2 819 | XboxOneDescription: 820 | XboxOneLanguage: 821 | - enus 822 | XboxOneCapability: [] 823 | XboxOneGameRating: {} 824 | XboxOneIsContentPackage: 0 825 | XboxOneEnhancedXboxCompatibilityMode: 0 826 | XboxOneEnableGPUVariability: 1 827 | XboxOneSockets: {} 828 | XboxOneSplashScreen: {fileID: 0} 829 | XboxOneAllowedProductIds: [] 830 | XboxOnePersistentLocalStorageSize: 0 831 | XboxOneXTitleMemory: 8 832 | XboxOneOverrideIdentityName: 833 | XboxOneOverrideIdentityPublisher: 834 | vrEditorSettings: {} 835 | cloudServicesEnabled: {} 836 | luminIcon: 837 | m_Name: 838 | m_ModelFolderPath: 839 | m_PortalFolderPath: 840 | luminCert: 841 | m_CertPath: 842 | m_SignPackage: 1 843 | luminIsChannelApp: 0 844 | luminVersion: 845 | m_VersionCode: 1 846 | m_VersionName: 847 | apiCompatibilityLevel: 6 848 | activeInputHandler: 0 849 | cloudProjectId: 850 | framebufferDepthMemorylessMode: 0 851 | qualitySettingsNames: [] 852 | projectName: 853 | organizationId: 854 | cloudEnabled: 0 855 | legacyClampBlendShapeWeights: 0 856 | playerDataPath: 857 | forceSRGBBlit: 1 858 | virtualTexturingSupportEnabled: 0 859 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2021.3.9f1 2 | m_EditorVersionWithRevision: 2021.3.9f1 (ad3870b89536) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Low 47 | pixelLightCount: 0 48 | shadows: 0 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 20 53 | shadowNearPlaneOffset: 3 54 | shadowCascade2Split: 0.33333334 55 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 56 | shadowmaskMode: 0 57 | skinWeights: 2 58 | textureQuality: 0 59 | anisotropicTextures: 0 60 | antiAliasing: 0 61 | softParticles: 0 62 | softVegetation: 0 63 | realtimeReflectionProbes: 0 64 | billboardsFaceCameraPosition: 0 65 | vSyncCount: 0 66 | lodBias: 0.4 67 | maximumLODLevel: 0 68 | streamingMipmapsActive: 0 69 | streamingMipmapsAddAllCameras: 1 70 | streamingMipmapsMemoryBudget: 512 71 | streamingMipmapsRenderersPerFrame: 512 72 | streamingMipmapsMaxLevelReduction: 2 73 | streamingMipmapsMaxFileIORequests: 1024 74 | particleRaycastBudget: 16 75 | asyncUploadTimeSlice: 2 76 | asyncUploadBufferSize: 16 77 | asyncUploadPersistentBuffer: 1 78 | resolutionScalingFixedDPIFactor: 1 79 | customRenderPipeline: {fileID: 0} 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Medium 83 | pixelLightCount: 1 84 | shadows: 1 85 | shadowResolution: 0 86 | shadowProjection: 1 87 | shadowCascades: 1 88 | shadowDistance: 20 89 | shadowNearPlaneOffset: 3 90 | shadowCascade2Split: 0.33333334 91 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 92 | shadowmaskMode: 0 93 | skinWeights: 2 94 | textureQuality: 0 95 | anisotropicTextures: 1 96 | antiAliasing: 0 97 | softParticles: 0 98 | softVegetation: 0 99 | realtimeReflectionProbes: 0 100 | billboardsFaceCameraPosition: 0 101 | vSyncCount: 1 102 | lodBias: 0.7 103 | maximumLODLevel: 0 104 | streamingMipmapsActive: 0 105 | streamingMipmapsAddAllCameras: 1 106 | streamingMipmapsMemoryBudget: 512 107 | streamingMipmapsRenderersPerFrame: 512 108 | streamingMipmapsMaxLevelReduction: 2 109 | streamingMipmapsMaxFileIORequests: 1024 110 | particleRaycastBudget: 64 111 | asyncUploadTimeSlice: 2 112 | asyncUploadBufferSize: 16 113 | asyncUploadPersistentBuffer: 1 114 | resolutionScalingFixedDPIFactor: 1 115 | customRenderPipeline: {fileID: 0} 116 | excludedTargetPlatforms: [] 117 | - serializedVersion: 2 118 | name: High 119 | pixelLightCount: 2 120 | shadows: 2 121 | shadowResolution: 1 122 | shadowProjection: 1 123 | shadowCascades: 2 124 | shadowDistance: 40 125 | shadowNearPlaneOffset: 3 126 | shadowCascade2Split: 0.33333334 127 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 128 | shadowmaskMode: 1 129 | skinWeights: 2 130 | textureQuality: 0 131 | anisotropicTextures: 1 132 | antiAliasing: 0 133 | softParticles: 0 134 | softVegetation: 1 135 | realtimeReflectionProbes: 1 136 | billboardsFaceCameraPosition: 1 137 | vSyncCount: 1 138 | lodBias: 1 139 | maximumLODLevel: 0 140 | streamingMipmapsActive: 0 141 | streamingMipmapsAddAllCameras: 1 142 | streamingMipmapsMemoryBudget: 512 143 | streamingMipmapsRenderersPerFrame: 512 144 | streamingMipmapsMaxLevelReduction: 2 145 | streamingMipmapsMaxFileIORequests: 1024 146 | particleRaycastBudget: 256 147 | asyncUploadTimeSlice: 2 148 | asyncUploadBufferSize: 16 149 | asyncUploadPersistentBuffer: 1 150 | resolutionScalingFixedDPIFactor: 1 151 | customRenderPipeline: {fileID: 0} 152 | excludedTargetPlatforms: [] 153 | - serializedVersion: 2 154 | name: Very High 155 | pixelLightCount: 3 156 | shadows: 2 157 | shadowResolution: 2 158 | shadowProjection: 1 159 | shadowCascades: 2 160 | shadowDistance: 70 161 | shadowNearPlaneOffset: 3 162 | shadowCascade2Split: 0.33333334 163 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 164 | shadowmaskMode: 1 165 | skinWeights: 4 166 | textureQuality: 0 167 | anisotropicTextures: 2 168 | antiAliasing: 2 169 | softParticles: 1 170 | softVegetation: 1 171 | realtimeReflectionProbes: 1 172 | billboardsFaceCameraPosition: 1 173 | vSyncCount: 1 174 | lodBias: 1.5 175 | maximumLODLevel: 0 176 | streamingMipmapsActive: 0 177 | streamingMipmapsAddAllCameras: 1 178 | streamingMipmapsMemoryBudget: 512 179 | streamingMipmapsRenderersPerFrame: 512 180 | streamingMipmapsMaxLevelReduction: 2 181 | streamingMipmapsMaxFileIORequests: 1024 182 | particleRaycastBudget: 1024 183 | asyncUploadTimeSlice: 2 184 | asyncUploadBufferSize: 16 185 | asyncUploadPersistentBuffer: 1 186 | resolutionScalingFixedDPIFactor: 1 187 | customRenderPipeline: {fileID: 0} 188 | excludedTargetPlatforms: [] 189 | - serializedVersion: 2 190 | name: Ultra 191 | pixelLightCount: 4 192 | shadows: 2 193 | shadowResolution: 2 194 | shadowProjection: 1 195 | shadowCascades: 4 196 | shadowDistance: 150 197 | shadowNearPlaneOffset: 3 198 | shadowCascade2Split: 0.33333334 199 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 200 | shadowmaskMode: 1 201 | skinWeights: 255 202 | textureQuality: 0 203 | anisotropicTextures: 2 204 | antiAliasing: 2 205 | softParticles: 1 206 | softVegetation: 1 207 | realtimeReflectionProbes: 1 208 | billboardsFaceCameraPosition: 1 209 | vSyncCount: 1 210 | lodBias: 2 211 | maximumLODLevel: 0 212 | streamingMipmapsActive: 0 213 | streamingMipmapsAddAllCameras: 1 214 | streamingMipmapsMemoryBudget: 512 215 | streamingMipmapsRenderersPerFrame: 512 216 | streamingMipmapsMaxLevelReduction: 2 217 | streamingMipmapsMaxFileIORequests: 1024 218 | particleRaycastBudget: 4096 219 | asyncUploadTimeSlice: 2 220 | asyncUploadBufferSize: 16 221 | asyncUploadPersistentBuffer: 1 222 | resolutionScalingFixedDPIFactor: 1 223 | customRenderPipeline: {fileID: 0} 224 | excludedTargetPlatforms: [] 225 | m_PerPlatformDefaultQuality: 226 | Android: 2 227 | Lumin: 5 228 | GameCoreScarlett: 5 229 | GameCoreXboxOne: 5 230 | Nintendo Switch: 5 231 | PS4: 5 232 | PS5: 5 233 | Stadia: 5 234 | Standalone: 5 235 | WebGL: 3 236 | Windows Store Apps: 5 237 | XboxOne: 5 238 | iPhone: 2 239 | tvOS: 2 240 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | UnityAdsSettings: 27 | m_Enabled: 0 28 | m_InitializeOnStartup: 1 29 | m_TestMode: 0 30 | m_IosGameId: 31 | m_AndroidGameId: 32 | m_GameIds: {} 33 | m_GameId: 34 | PerformanceReportingSettings: 35 | m_Enabled: 0 36 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | m_CompiledVersion: 0 14 | m_RuntimeVersion: 0 15 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /ProjectSettings/boot.config: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LiuOcean/ValueTypes_Memory_Encrypt/4291d442eb1e8933c1e9d3c2660702e37462c555/ProjectSettings/boot.config -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 值类型内存加密 2 | 3 | [![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) 4 | 5 | 此库对常见的值类型做了比较完善的内存加密,可以抵御常见的内存搜索工具,本方案在 [CSEncryptType](https://github.com/nichos1983/CSEncryptType) 的设计基础上,针对 `堆内存` 消耗过大的问题进行了优化 6 | 7 | 具体使用如下: 8 | 9 | ```csharp 10 | EncryptLong encrypt = 0; 11 | encrypt.Set(100); 12 | ``` 13 | 14 | > 如果你比较关心其中的性能,可以打开 Test Runner,然后在 Performance 中查看每种加密类型与原生的性能差别,下图为 long 加密类型的性能对比 15 | 16 | ![image](Pic/EncryptLong_Benchmark.png) 17 | 18 | 需要注意的是,对当前 struct 直接 set 性能非常接近原生,但是如果使用 `=` 赋值,会有一个数量级的性能差别,具体使用请根据自己的场景进行甄别 --------------------------------------------------------------------------------