예제 #1
0
    void Update()
    {
        m_frontLayerRawImage.texture = frontLayer.getTexture();
        m_backLayerRawImage.texture  = backLayer.getTexture();

        screenSize = m_mainCanvas.pixelRect.size;
    }
예제 #2
0
    public Texture2D getResultTexture()
    {
        Color32[] resultColors;
        if (frontLayerNull)
        {
            resultColors = _actualColors;
        }
        else
        {
            resultColors = TextureUtil.mergetTextureAbovePixelArray(frontLayer.getTexture(), _actualColors);
        }

        Texture2D result = new Texture2D((int)this.size.x,
                                         (int)this.size.y,
                                         TextureFormat.ARGB32,
                                         false);

        result.SetPixels32(resultColors);
        result.Apply();
        resultColors = null;
        return(result);
    }