diff --git a/Assets/PlayerPrefsExtra/PlayerPrefsExtra.cs b/Assets/PlayerPrefsExtra/PlayerPrefsExtra.cs deleted file mode 100644 index ab81818..0000000 --- a/Assets/PlayerPrefsExtra/PlayerPrefsExtra.cs +++ /dev/null @@ -1,187 +0,0 @@ -using UnityEngine; -using System.Collections.Generic; - -/// -/// PlayerPrefsExtra gives you more possibilities like saving complex types : -/// Vectors, Colors, Quaternions, Lists, and Your Pre defined types (Object) [classes or structs]. -/// -/// Developed by Hamza Herbou -/// -------------------------------------------------------------------------------------------------------- -/// Email : hamza95herbou@gmail.com -/// GITHUB : https://github.com/herbou/ -/// -/// - -public static class PlayerPrefsExtra -{ - #region Bool ----------------------------------------------------------------------------------------- - - public static bool GetBool (string key) - { - return (PlayerPrefs.GetInt (key, 0) == 1); - } - - public static bool GetBool (string key, bool defaultValue) - { - return (PlayerPrefs.GetInt (key, (defaultValue ? 1 : 0)) == 1); - } - - public static void SetBool (string key, bool value) - { - PlayerPrefs.SetInt (key, (value ? 1 : 0)); - } - - #endregion - - #region Vector 2 ----------------------------------------------------------------------------------------- - - public static Vector2 GetVector2 (string key) - { - return Get (key, Vector2.zero); - } - - public static Vector2 GetVector2 (string key, Vector2 defaultValue) - { - return Get (key, defaultValue); - } - - public static void SetVector2 (string key, Vector2 value) - { - Set (key, value); - } - - #endregion - - #region Vector 3 ----------------------------------------------------------------------------------------- - - public static Vector3 GetVector3 (string key) - { - return Get (key, Vector3.zero); - } - - public static Vector3 GetVector3 (string key, Vector3 defaultValue) - { - return Get (key, defaultValue); - } - - public static void SetVector3 (string key, Vector3 value) - { - Set (key, value); - } - - #endregion - - #region Vector 4 ----------------------------------------------------------------------------------------- - - public static Vector4 GetVector4 (string key) - { - return Get (key, Vector4.zero); - } - - public static Vector4 GetVector4 (string key, Vector4 defaultValue) - { - return Get (key, defaultValue); - } - - public static void SetVector4 (string key, Vector4 value) - { - Set (key, value); - } - - #endregion - - #region Color ----------------------------------------------------------------------------------------- - - public static Color GetColor (string key) - { - return Get (key, new Color (0f, 0f, 0f, 0f)); - } - - public static Color GetColor (string key, Color defaultValue) - { - return Get (key, defaultValue); - } - - public static void SetColor (string key, Color value) - { - Set (key, value); - } - - #endregion - - #region Quaternion ----------------------------------------------------------------------------------------- - - public static Quaternion GetQuaternion (string key) - { - return Get (key, Quaternion.identity); - } - - public static Quaternion GetQuaternion (string key, Quaternion defaultValue) - { - return Get (key, defaultValue); - } - - public static void SetQuaternion (string key, Quaternion value) - { - Set (key, value); - } - - #endregion - - #region List ----------------------------------------------------------------------------------------- - - public class ListWrapper - { - public List list = new List (); - } - - public static List GetList (string key) - { - return Get> (key, new ListWrapper ()).list; - } - - public static List GetList (string key, List defaultValue) - { - return Get> (key, new ListWrapper { list = defaultValue }).list; - } - - public static void SetList (string key, List value) - { - Set (key, new ListWrapper { list = value }); - } - - #endregion - - - #region Object ----------------------------------------------------------------------------------------- - - public static T GetObject (string key) - { - return Get (key, default(T)); - } - - public static T GetObject (string key, T defaultValue) - { - return Get (key, defaultValue); - } - - public static void SetObject (string key, T value) - { - Set (key, value); - } - - #endregion - - //Generic template --------------------------------------------------------------------------------------- - - static T Get (string key, T defaultValue) - { - return JsonUtility.FromJson (PlayerPrefs.GetString (key, JsonUtility.ToJson (defaultValue))); - } - - static void Set (string key, T value) - { - PlayerPrefs.SetString (key, JsonUtility.ToJson (value)); - } - -} diff --git a/Assets/scene.unity b/Assets/scene.unity deleted file mode 100644 index c9946b5..0000000 Binary files a/Assets/scene.unity and /dev/null differ diff --git a/LICENCE.meta b/LICENCE.meta new file mode 100644 index 0000000..e3c84b5 --- /dev/null +++ b/LICENCE.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 78740c75ee5f0b04bb7f67597a9f0f81 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/PlayerPrefsExtra_v1.unitypackage.meta b/PlayerPrefsExtra_v1.unitypackage.meta new file mode 100644 index 0000000..4912a47 --- /dev/null +++ b/PlayerPrefsExtra_v1.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 65bd84384ccf79d4babfd0b43ac912cf +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/README.md.meta b/README.md.meta new file mode 100644 index 0000000..f1aeed0 --- /dev/null +++ b/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d907636f289dd5449ba6f88171518407 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlayerPrefsExtra.meta b/Runtime.meta similarity index 100% rename from Assets/PlayerPrefsExtra.meta rename to Runtime.meta diff --git a/Runtime/PlayerPrefsExtra.asmdef b/Runtime/PlayerPrefsExtra.asmdef new file mode 100644 index 0000000..68c8014 --- /dev/null +++ b/Runtime/PlayerPrefsExtra.asmdef @@ -0,0 +1,3 @@ +{ + "name": "PlayerPrefsExtra" +} diff --git a/Runtime/PlayerPrefsExtra.asmdef.meta b/Runtime/PlayerPrefsExtra.asmdef.meta new file mode 100644 index 0000000..2b44285 --- /dev/null +++ b/Runtime/PlayerPrefsExtra.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cf42c42b44a314d448788e7a0168530e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/PlayerPrefsExtra.cs b/Runtime/PlayerPrefsExtra.cs new file mode 100644 index 0000000..b2da565 --- /dev/null +++ b/Runtime/PlayerPrefsExtra.cs @@ -0,0 +1,160 @@ +using UnityEngine; +using System.Collections.Generic; + +/// +/// PlayerPrefsExtra gives you more possibilities like saving complex types : +/// Vectors, Colors, Quaternions, Lists, and Your Pre defined types (Object) [classes or structs]. +/// +/// Developed by Hamza Herbou +/// --------------- +/// Email : hamza95herbou@gmail.com +/// GITHUB : https://github.com/herbou/ +/// +/// +public class PlayerPrefsExtra : PlayerPrefs +{ + // Bool + public static bool GetBool(string key) + { + return (PlayerPrefs.GetInt(key, 0) == 1); + } + + public static bool GetBool(string key, bool defaultValue) + { + return (PlayerPrefs.GetInt(key, (defaultValue ? 1 : 0)) == 1); + } + + public static void SetBool(string key, bool value) + { + PlayerPrefs.SetInt(key, (value ? 1 : 0)); + } + + // Vector 2 + public static Vector2 GetVector2(string key) + { + return Get(key, Vector2.zero); + } + + public static Vector2 GetVector2(string key, Vector2 defaultValue) + { + return Get(key, defaultValue); + } + + public static void SetVector2(string key, Vector2 value) + { + Set(key, value); + } + + // Vector 3 + public static Vector3 GetVector3(string key) + { + return Get(key, Vector3.zero); + } + + public static Vector3 GetVector3(string key, Vector3 defaultValue) + { + return Get(key, defaultValue); + } + + public static void SetVector3(string key, Vector3 value) + { + Set(key, value); + } + + // Vector 4 + public static Vector4 GetVector4(string key) + { + return Get(key, Vector4.zero); + } + + public static Vector4 GetVector4(string key, Vector4 defaultValue) + { + return Get(key, defaultValue); + } + + public static void SetVector4(string key, Vector4 value) + { + Set(key, value); + } + + // Color + public static Color GetColor(string key) + { + return Get(key, new Color(0f, 0f, 0f, 0f)); + } + + public static Color GetColor(string key, Color defaultValue) + { + return Get(key, defaultValue); + } + + public static void SetColor(string key, Color value) + { + Set(key, value); + } + + // Quaternion + public static Quaternion GetQuaternion(string key) + { + return Get(key, Quaternion.identity); + } + + public static Quaternion GetQuaternion(string key, Quaternion defaultValue) + { + return Get(key, defaultValue); + } + + public static void SetQuaternion(string key, Quaternion value) + { + Set(key, value); + } + + // List + public class ListWrapper + { + public List list = new List(); + } + + public static List GetList(string key) + { + return Get>(key, new ListWrapper()).list; + } + + public static List GetList(string key, List defaultValue) + { + return Get>(key, new ListWrapper { list = defaultValue }).list; + } + + public static void SetList(string key, List value) + { + Set(key, new ListWrapper { list = value }); + } + + // Object + public static T GetObject(string key) + { + return Get(key, default(T)); + } + + public static T GetObject(string key, T defaultValue) + { + return Get(key, defaultValue); + } + + public static void SetObject(string key, T value) + { + Set(key, value); + } + + //Generic template --------------------------------------------------------------------------------------- + + static T Get(string key, T defaultValue) + { + return JsonUtility.FromJson(PlayerPrefs.GetString(key, JsonUtility.ToJson(defaultValue))); + } + + static void Set(string key, T value) + { + PlayerPrefs.SetString(key, JsonUtility.ToJson(value)); + } +} \ No newline at end of file diff --git a/Assets/PlayerPrefsExtra/PlayerPrefsExtra.cs.meta b/Runtime/PlayerPrefsExtra.cs.meta similarity index 100% rename from Assets/PlayerPrefsExtra/PlayerPrefsExtra.cs.meta rename to Runtime/PlayerPrefsExtra.cs.meta diff --git a/Assets/Scripts.meta b/Samples~/Samples.meta similarity index 58% rename from Assets/Scripts.meta rename to Samples~/Samples.meta index 9ba292a..e6bd49c 100644 --- a/Assets/Scripts.meta +++ b/Samples~/Samples.meta @@ -1,9 +1,8 @@ fileFormatVersion: 2 -guid: 3c2ee21c70f29ca45824f14d6efddf41 +guid: cae8441f9dd6cc14a94d285d1939faff folderAsset: yes -timeCreated: 1600786977 -licenseType: Pro DefaultImporter: + externalObjects: {} userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Scripts/Demo1.cs b/Samples~/Samples/Demo1.cs similarity index 100% rename from Assets/Scripts/Demo1.cs rename to Samples~/Samples/Demo1.cs diff --git a/Assets/Scripts/Demo1.cs.meta b/Samples~/Samples/Demo1.cs.meta similarity index 100% rename from Assets/Scripts/Demo1.cs.meta rename to Samples~/Samples/Demo1.cs.meta diff --git a/Assets/Scripts/Demo2.cs b/Samples~/Samples/Demo2.cs similarity index 100% rename from Assets/Scripts/Demo2.cs rename to Samples~/Samples/Demo2.cs diff --git a/Assets/Scripts/Demo2.cs.meta b/Samples~/Samples/Demo2.cs.meta similarity index 100% rename from Assets/Scripts/Demo2.cs.meta rename to Samples~/Samples/Demo2.cs.meta diff --git a/Assets/Scripts/Demo3.cs b/Samples~/Samples/Demo3.cs similarity index 100% rename from Assets/Scripts/Demo3.cs rename to Samples~/Samples/Demo3.cs diff --git a/Assets/Scripts/Demo3.cs.meta b/Samples~/Samples/Demo3.cs.meta similarity index 100% rename from Assets/Scripts/Demo3.cs.meta rename to Samples~/Samples/Demo3.cs.meta diff --git a/Samples~/Samples/PlayerPrefsExtra Demo Scene.unity b/Samples~/Samples/PlayerPrefsExtra Demo Scene.unity new file mode 100644 index 0000000..29cc916 --- /dev/null +++ b/Samples~/Samples/PlayerPrefsExtra Demo Scene.unity @@ -0,0 +1,373 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 10 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 13 + m_BakeOnSceneLoad: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 1 + m_PVRFilteringGaussRadiusAO: 1 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: 27028233dda83d74284eceb951479764, type: 2} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &282616216 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 282616218} + - component: {fileID: 282616217} + m_Layer: 0 + m_Name: '[ Demo1 ]' + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &282616217 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 282616216} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: acbd0ab430d896d4887244a2ec453d5d, type: 3} + m_Name: + m_EditorClassIdentifier: + pos: {x: 0, y: 0} + col: + r: 0 + g: 0 + b: 0 + a: 0 + rot: {x: 0, y: 0, z: 0, w: 0} +--- !u!4 &282616218 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 282616216} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &356314326 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 356314328} + - component: {fileID: 356314327} + m_Layer: 0 + m_Name: '[ Demo2 ]' + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &356314327 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 356314326} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 06cb0b6364003e0498efa5bef1da22a1, type: 3} + m_Name: + m_EditorClassIdentifier: + listInt: +--- !u!4 &356314328 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 356314326} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &447193715 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 447193720} + - component: {fileID: 447193719} + - component: {fileID: 447193717} + - component: {fileID: 447193716} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &447193716 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 447193715} + m_Enabled: 1 +--- !u!124 &447193717 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 447193715} + m_Enabled: 1 +--- !u!20 &447193719 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 447193715} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.4417178, g: 0.40192473, b: 0.9264706, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &447193720 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 447193715} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1533741348 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1533741350} + - component: {fileID: 1533741349} + m_Layer: 0 + m_Name: '[ Demo3 ]' + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1533741349 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1533741348} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e23c93927315d6747a39f7a61a1cf9a6, type: 3} + m_Name: + m_EditorClassIdentifier: + myShape: + points: 0 + pos: {x: 0, y: 0} +--- !u!4 &1533741350 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1533741348} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 447193720} + - {fileID: 282616218} + - {fileID: 356314328} + - {fileID: 1533741350} diff --git a/Assets/scene.unity.meta b/Samples~/Samples/PlayerPrefsExtra Demo Scene.unity.meta similarity index 100% rename from Assets/scene.unity.meta rename to Samples~/Samples/PlayerPrefsExtra Demo Scene.unity.meta diff --git a/package.json b/package.json new file mode 100644 index 0000000..b5174fd --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "name": "com.herbou.player-prefs-extra", + "displayName": "Player Prefs Extra", + "version": "1.0.1", + "description": "Unity PlayerPrefsExtra gives you the ability to save more complexe data types such as : Vectors, Bool, Colors, Lists, ... and it uses the Unity's PlayerPrefs behind the scene.", + "homepage": "https://github.com/herbou/UnityPlayerPrefsExtra", + "author": { + "name": "herbou", + "url": "https://github.com/herbou" + }, + "license": "https://github.com/herbou/UnityPlayerPrefsExtra/blob/master/LICENCE", + "samples": [ + { + "displayName": "Usage Examples", + "description": "Contains scene with few MonoBehaviour demo scripts", + "path": "Samples~/Samples" + } + ] +} \ No newline at end of file diff --git a/package.json.meta b/package.json.meta new file mode 100644 index 0000000..97d243d --- /dev/null +++ b/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 560cc5e6cf3789d48baf845513f3cc23 +PackageManifestImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: