Ejemplo n.º 1
0
    void SaveConstructionScreenshot(ConstructionBuilder builder, Transform constructTarget)
    {
        builder.SetConstructionPivot(ConstructionBuilder.ConstructionPivot.MiddleCenter);
        Vector3    pos = constructTarget.position;
        Quaternion rot = constructTarget.rotation;

        constructTarget.Translate(100f, 0f, 0f);
        ScreenshotCamera screenshot = FindObjectOfType <ScreenshotCamera>();

        Assert.IsNotNull <ScreenshotCamera>(screenshot, "Screenshot Camera should not be null");
        screenshot.TakeScreenshot(_numUserConstructions - 1);
        constructTarget.position = pos;
        constructTarget.rotation = rot;
    }