Captura.PrepararPrefab(UnityEngine.GameObject, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Vector3)

Here are the examples of the csharp api Captura.PrepararPrefab(UnityEngine.GameObject, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Vector3) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 View Source File : Captura.cs
License : GNU Lesser General Public License v3.0
Project Creator : pepeizq

public Texture2D GenerarCapturaPrefab(GameObject prefab, Color fondoColor, Vector3 posicionOffset, Quaternion rotacion, Vector3 escala, int ancho = 128, int alto = 128)
    {
        if (prefab == null)
            throw new ArgumentNullException("prefab");
        else if (prefab.scene.name != null)
            throw new ArgumentException("prefab parameter must be a prefab! If you want to use an instance, use TakeObjectSnapshot instead.", "prefab");

        GameObject instancia = PrepararPrefab(prefab, posicionOffset, rotacion, escala);
        Texture2D captura = GenerarCaptura(fondoColor, ancho, alto);
        DestroyImmediate(instancia);

        return captura;
    }