OldBlueWater/BlueWater/Assets/RayFire/Scripts/Components/RayfireSnapshot.cs
2023-08-22 14:31:24 +09:00

39 lines
888 B
C#

using UnityEngine;
namespace RayFire
{
[SelectionBase]
[DisallowMultipleComponent]
[AddComponentMenu("RayFire/Rayfire Snapshot")]
[HelpURL("https://rayfirestudios.com/unity-online-help/components/unity-snapshot-component/")]
public class RayfireSnapshot: MonoBehaviour
{
public string assetName;
public bool compress;
public Object snapshotAsset;
public float sizeFilter;
// Reset
void Reset()
{
assetName = gameObject.name;
}
#if UNITY_EDITOR
// Save asset
public void Snapshot()
{
RFSnapshotAsset.Snapshot (gameObject, compress, assetName);
}
// Load asset
public void Load()
{
RFSnapshotAsset.Load (snapshotAsset, gameObject, sizeFilter);
}
#endif
}
}