Show / Hide Table of Contents

Class ImageCreator

Class that unifies the methods in order to be able to snapshot any game item out of unity

Inheritance
Object
ImageCreator
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: VISABConnector.Unity
Assembly: VISABConnector.Unity.dll
Syntax
public static class ImageCreator

Fields

| Improve this Doc View Source

VISABLayerName

The VISAB layer variable which is assigned to every game object that will be snapshotted

Declaration
public const string VISABLayerName = "VISAB"
Field Value
Type Description
String

Methods

| Improve this Doc View Source

InstantiateGameObject(InstantiationConfiguration)

Instantiates a GameObject based on the given configuration and returns the instance.

Declaration
public static GameObject InstantiateGameObject(InstantiationConfiguration config)
Parameters
Type Name Description
InstantiationConfiguration config

The configuration based on which the GameObject will be instantiated

Returns
Type Description
UnityEngine.GameObject

The instance for the given configuration

| Improve this Doc View Source

SetLayerRecursively(GameObject, Int32)

Assigns Layer to all children of gameobject

Declaration
public static void SetLayerRecursively(GameObject obj, int layer)
Parameters
Type Name Description
UnityEngine.GameObject obj
Int32 layer
| Improve this Doc View Source

TakeSnapshot(SnapshotConfiguration)

The actual method that conducts the snapshotting of game objects. It is calibrated by passing a config object to it

Declaration
public static byte[] TakeSnapshot(SnapshotConfiguration config)
Parameters
Type Name Description
SnapshotConfiguration config

The config object that handles the specific requirements for snapping certain game objects

Returns
Type Description
Byte[]

A byte array which can be converted to a PNG-file or inserted into a JSON-File

| Improve this Doc View Source

TakeSnapshots(IEnumerable<SnapshotConfiguration>)

Conduct several snapshots at once

Declaration
public static IDictionary<SnapshotConfiguration, byte[]> TakeSnapshots(IEnumerable<SnapshotConfiguration> configs)
Parameters
Type Name Description
IEnumerable<SnapshotConfiguration> configs

The config objects you will need for the snapshots

Returns
Type Description
IDictionary<SnapshotConfiguration, Byte[]>

A dictionary which contains the byte arrays with their respective configuration objects

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX