void InitTexture() { Texture2D originTexture = (Texture2D)TargetMaterial.GetTexture(mTargetMaterialProperty); if (originTexture == null) { Debug.LogError(GetType() + "->InitTarget: target texture not found !"); return; } // pixels mTargetPixels = originTexture.GetPixels32(); // target texture mTargetTexture = new Texture2D(originTexture.width, originTexture.height, TextureFormat.ARGB32, false); mTargetTexture.SetPixels32(mTargetPixels); mTargetTexture.Apply(); TargetMaterial.SetTexture(mTargetMaterialProperty, mTargetTexture); }