Show / Hide Table of Contents

Class RenderManager

Manager for rendering Sprites of GameObjects
Inheritance
System.Object
RenderManager
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Jotunn.Managers
Assembly: Jotunn.dll
Syntax
public class RenderManager : IManager

Fields

| Improve this Doc View Source

IsometricRotation

Rotation of the prefab that will result in an isometric view
Declaration
public static readonly Quaternion IsometricRotation
Field Value
Type Description
Quaternion

Properties

| Improve this Doc View Source

Instance

Singleton instance
Declaration
public static RenderManager Instance { get; }
Property Value
Type Description
RenderManager

Methods

| Improve this Doc View Source

EnqueueRender(GameObject, Action<Sprite>)

Create a of the target
Declaration
[Obsolete("Use Render instead")]
public bool EnqueueRender(GameObject target, Action<Sprite> callback)
Parameters
Type Name Description
GameObject target GameObject to render
System.Action<Sprite> callback Callback for the generated
Returns
Type Description
System.Boolean If this is called on a headless server or when there is no active visual Mesh attached to the target, this method invokes the callback with null immediately and returns false.
| Improve this Doc View Source

EnqueueRender(GameObject, Action<Sprite>, Int32, Int32)

Queues a new prefab to be rendered. The resulting will be ready at the next frame. If there is no active visual Mesh attached to the target, this method invokes the callback with null immediately.
Declaration
[Obsolete("Use Render instead")]
public bool EnqueueRender(GameObject target, Action<Sprite> callback, int width = 128, int height = 128)
Parameters
Type Name Description
GameObject target Object to be rendered. A copy of the provided GameObject will be created for rendering
System.Action<Sprite> callback Action that gets called when the rendering is complete
System.Int32 width Width of the resulting
System.Int32 height Height of the resulting
Returns
Type Description
System.Boolean Only true if the target was queued for rendering
| Improve this Doc View Source

EnqueueRender(RenderManager.RenderRequest, Action<Sprite>)

Enqueue a render of the RenderManager.RenderRequest
Declaration
[Obsolete("Use Render instead")]
public bool EnqueueRender(RenderManager.RenderRequest renderRequest, Action<Sprite> callback)
Parameters
Type Name Description
RenderManager.RenderRequest renderRequest
System.Action<Sprite> callback Callback for the generated
Returns
Type Description
System.Boolean If this is called on a headless server or when there is no active visual Mesh attached to the target, this method invokes the callback with null immediately and returns false.
| Improve this Doc View Source

Init()

Initialize the manager
Declaration
public void Init()
| Improve this Doc View Source

Render(GameObject)

Create a of the target
Declaration
public Sprite Render(GameObject target)
Parameters
Type Name Description
GameObject target Can be a prefab or any existing GameObject in the world
Returns
Type Description
Sprite If this is called on a headless server or when there is no active visual Mesh attached to the target, this method returns null.
| Improve this Doc View Source

Render(GameObject, Quaternion)

Create a of the target
Declaration
public Sprite Render(GameObject target, Quaternion rotation)
Parameters
Type Name Description
GameObject target Can be a prefab or any existing GameObject in the world
Quaternion rotation Rotation while rendering of the GameObject. See
RenderManager.IsometricRotation
for example/>
Returns
Type Description
Sprite If this is called on a headless server or when there is no active visual Mesh attached to the target, this method returns null.
| Improve this Doc View Source

Render(RenderManager.RenderRequest)

Create a from a RenderManager.RenderRequest/>
Declaration
public Sprite Render(RenderManager.RenderRequest renderRequest)
Parameters
Type Name Description
RenderManager.RenderRequest renderRequest
Returns
Type Description
Sprite If this is called on a headless server or when there is no active visual Mesh attached to the target, this method returns null.

Extension Methods

PrefabExtension.FixReferences(Object)
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾