Table of Contents

Class ScreenshotTaker

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

Provides a generic implementation of a singleton-like pattern for MonoBehaviour classes. This class automatically searches for an existing instance in the scene or logs an error if none or more than one are found.

[AddComponentMenu("Gamelogic/Extensions/ScreenshotTaker")]
[ExecuteInEditMode]
public sealed class ScreenshotTaker : Singleton<ScreenshotTaker>
Inheritance
ScreenshotTaker
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.runInEditMode
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponents<T>()
Component.gameObject
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DestroyObject(Object)
Object.ToString()
Object.hideFlags
Extension Methods

Remarks

Singletons usually manage their own creation, but it is common in Unity projects to have a singleton already placed in the scene. In this sense, this class really checks whether an instance can be used as a singleton, and then provides access to the instance.

If you want to create a singleton that is not already placed in the scene, you can use put
<xref href="Gamelogic.Extensions.SingletonSpawner%601" data-throw-if-not-resolved="false"></xref> in the scene instead.

Methods

Start()
Take()
TakeClean()
TakeTexture()
Update()