浏览代码

Use resize instead of new

/hotfix-v0.9.2a
Arthur Juliani 6 年前
当前提交
993b7a1a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      unity-environment/Assets/ML-Agents/Scripts/Agent.cs

2
unity-environment/Assets/ML-Agents/Scripts/Agent.cs


if (width != texture2D.width || height != texture2D.height)
{
texture2D = new Texture2D(width, height, TextureFormat.RGB24, false);
texture2D.Resize(width, height);
}
var prevActiveRT = RenderTexture.active;

正在加载...
取消
保存