InformationSaveAndAudioCore_Over
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
//=======================================================
|
||||
// 作者:王则昆
|
||||
// 描述:
|
||||
//=======================================================
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class AnchoredPositionExtension
|
||||
{
|
||||
public static AnchoredPosition.Information GetAnchoredPositionInformation(this RectTransform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<AnchoredPosition>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static Vector3 GetAnchoredPosition(this RectTransform tf, string desc)
|
||||
{
|
||||
return GetAnchoredPositionInformation(tf, desc).anchoredPosition.SetVector2Data();
|
||||
}
|
||||
|
||||
public static void SetAnchoredPosition(this RectTransform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<AnchoredPosition>().Set(desc);
|
||||
}
|
||||
|
||||
public static AnchoredPosition.Information GetAnchoredPositionInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<AnchoredPosition>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static Vector3 GetAnchoredPosition(this Transform tf, string desc)
|
||||
{
|
||||
return GetAnchoredPositionInformation(tf, desc).anchoredPosition.SetVector2Data();
|
||||
}
|
||||
|
||||
public static void SetAnchoredPosition(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<AnchoredPosition>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ccf4bfdd8fa15e4bb9f960a8fd8043e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,27 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class CameraInfoExtension
|
||||
{
|
||||
public static CameraInfo.Information GetCameraInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<CameraInfo>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static void SetCameraInfo(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<CameraInfo>().Set(desc);
|
||||
}
|
||||
|
||||
public static CameraInfo.Information GetCameraInformation(this Camera camera, string desc)
|
||||
{
|
||||
return camera.GetComponent<CameraInfo>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static void SetCameraInfo(this Camera camera, string desc)
|
||||
{
|
||||
camera.GetComponent<CameraInfo>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 181681708c62fd746bad97c7c2466778
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class EulerAnglesExtension
|
||||
{
|
||||
public static EulerAngles.Information GetEulerAnglesInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<EulerAngles>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static Vector3 GetEulerAngles(this Transform tf, string desc)
|
||||
{
|
||||
return GetEulerAnglesInformation(tf, desc).eulerAngles.SetVector3Data();
|
||||
}
|
||||
|
||||
public static void SetEulerAngles(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<EulerAngles>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 44d0cc77fd362de4a9a3e49083ab4083
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class JBoxColliderExtension
|
||||
{
|
||||
public static JBoxCollider.Information GetBoxColliderInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<JBoxCollider>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static void SetBoxCollider(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<JBoxCollider>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 06c219a2579145e41bb8abe74f529ca1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,27 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class LocalCameraInfoExtension
|
||||
{
|
||||
public static LocalCameraInfo.Information GetLocalCameraInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<LocalCameraInfo>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static void SetLocalCameraInfo(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<LocalCameraInfo>().Set(desc);
|
||||
}
|
||||
|
||||
public static LocalCameraInfo.Information GetLocalCameraInformation(this Camera camera, string desc)
|
||||
{
|
||||
return camera.GetComponent<LocalCameraInfo>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static void SetLocalCameraInfo(this Camera camera, string desc)
|
||||
{
|
||||
camera.GetComponent<LocalCameraInfo>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1834ac1eb7bea34eaf1233d3fbe8b98
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class LocalEulerAnglesExtension
|
||||
{
|
||||
public static LocalEulerAngles.Information GetLocalEulerAnglesInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<LocalEulerAngles>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static Vector3 GetLocalEulerAngles(this Transform tf, string desc)
|
||||
{
|
||||
return GetLocalEulerAnglesInformation(tf, desc).localEulerAngles.SetVector3Data();
|
||||
}
|
||||
|
||||
public static void SetLocalEulerAngles(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<LocalEulerAngles>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 557f7719d29961f489da4c917f107ed6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class LocalPositionEulerAnglesExtension
|
||||
{
|
||||
public static LocalPositionEulerAngles.Information GetLocalPositionEulerAnglesInformation(this Transform tf,
|
||||
string desc)
|
||||
{
|
||||
return tf.GetComponent<LocalPositionEulerAngles>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static void SetLocalPositionEulerAngles(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<LocalPositionEulerAngles>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f5fd207a730ab2459db6ab5cb61ac92
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class LocalPositionExtension
|
||||
{
|
||||
public static LocalPosition.Information GetLocalPositionInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<LocalPosition>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static Vector3 GetLocalPosition(this Transform tf, string desc)
|
||||
{
|
||||
return GetLocalPositionInformation(tf, desc).localPosition.SetVector3Data();
|
||||
}
|
||||
|
||||
public static void SetLocalPosition(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<LocalPosition>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac0cb760733c70641b6b5b696c137dc9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class LocalTransformInfoExtension
|
||||
{
|
||||
public static LocalTransformInfo.Information GetLocalTransformInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<LocalTransformInfo>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static void SetLocalTransformInfo(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<LocalTransformInfo>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26f9c07fe30c400479eea478f2e6557f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class PositionEulerAnglesExtension
|
||||
{
|
||||
public static PositionEulerAngles.Information GetPositionEulerAnglesInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<PositionEulerAngles>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static void SetPositionEulerAngles(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<PositionEulerAngles>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 158344c49f575164a825cf6b74670213
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class PositionExtension
|
||||
{
|
||||
public static Position.Information GetPositionInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<Position>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static Vector3 GetPosition(this Transform tf, string desc)
|
||||
{
|
||||
return GetPositionInformation(tf, desc).position.SetVector3Data();
|
||||
}
|
||||
|
||||
public static void SetPosition(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<Position>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c5840afa5ec12245982ccbc14e3da68
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class RectTransformInfoExtension
|
||||
{
|
||||
public static RectTransformInfo.Information GetRectTransformInformation(this RectTransform rectTransform,
|
||||
string desc)
|
||||
{
|
||||
return rectTransform.GetComponent<RectTransformInfo>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static void SetRectTransformInfo(this RectTransform rectTransform, string desc)
|
||||
{
|
||||
rectTransform.GetComponent<RectTransformInfo>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 513bbc7c53696644b84719b8dfe9d099
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class ScaleExtension
|
||||
{
|
||||
public static Scale.Information GetScaleInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<Scale>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static Vector3 GetScale(this Transform tf, string desc)
|
||||
{
|
||||
return GetScaleInformation(tf, desc).scale.SetVector3Data();
|
||||
}
|
||||
|
||||
public static void SetScale(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<Scale>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ebbe17c6f3f553745b5172d3f99fa4f6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,12 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class TrailRendererExtension
|
||||
{
|
||||
public static TrailRendererInfo.Information GetTrailRendererInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<TrailRendererInfo>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2409502855668eb4fa19a26c4675df0a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class TransformInfoExtension
|
||||
{
|
||||
public static TransformInfo.Information GetTransformInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<TransformInfo>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static void SetTransformInfo(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<TransformInfo>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 276444401c6e3554497746391a9ce0e5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class VectorExtension {
|
||||
|
||||
|
||||
public static Vector3Data GetVector3Data(this Vector3 vector)
|
||||
{
|
||||
return new Vector3Data(vector);
|
||||
}
|
||||
|
||||
public static Vector3 SetVector3Data(this Vector3Data vector3Data)
|
||||
{
|
||||
return new Vector3(vector3Data.x, vector3Data.y, vector3Data.z);
|
||||
}
|
||||
|
||||
public static Vector2Data GetVector2Data( this Vector2 vector)
|
||||
{
|
||||
return new Vector2Data(vector);
|
||||
}
|
||||
|
||||
public static Vector2 SetVector2Data(this Vector2Data vector3Data)
|
||||
{
|
||||
return new Vector2(vector3Data.x, vector3Data.y);
|
||||
}
|
||||
|
||||
}
|
||||
[Serializable]
|
||||
public class Vector3Data
|
||||
{
|
||||
public float x;
|
||||
public float y;
|
||||
public float z;
|
||||
|
||||
public Vector3Data()
|
||||
{
|
||||
|
||||
}
|
||||
public Vector3Data(Vector3 vector)
|
||||
{
|
||||
x = vector.x;
|
||||
y = vector.y;
|
||||
z = vector.z;
|
||||
}
|
||||
public Vector3Data(float x, float y, float z)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
}
|
||||
[Serializable]
|
||||
public class Vector2Data
|
||||
{
|
||||
public float x;
|
||||
public float y;
|
||||
|
||||
public Vector2Data(Vector2 vector)
|
||||
{
|
||||
x = vector.x;
|
||||
y = vector.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7ee1cfff85b47cb864e576a0253a648
|
||||
timeCreated: 1735197883
|
||||
Reference in New Issue
Block a user