Initial Commit

This commit is contained in:
Lachlan Leone
2024-01-20 20:00:35 +11:00
commit d78ae93c97
70 changed files with 3212 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
using Kitchen;
using UnityEngine;
namespace Pets.Utility
{
public static class PetSnapshot
{
public static Texture2D GetApplianceSnapshot(GameObject prefab)
{
int instanceID = prefab.GetInstanceID();
Quaternion rotation = Quaternion.LookRotation(new Vector3(-1f, 1f, -1f), new Vector3(0f, 1f, 1f));
SnapshotTexture snapshotTexture = Snapshot.RenderPrefabToTexture(512, 512, prefab, rotation, 0.5f, 0.5f, -10f, 10f, 1f, -0.25f * new Vector3(0f, 0, 1f));
return snapshotTexture.Snapshot;
}
}
}