浏览代码

refine sample

the camera's color must be set as A: 0, V: 0 so that the background can become transparent
/zxw-3d
xingweizhu 3 年前
当前提交
6d0a6229
共有 3 个文件被更改,包括 4 次插入4 次删除
  1. 4
      Samples/UIWidgetsSamples_2019_4/Assets/Resources/CubPrefab.prefab
  2. 2
      Samples/UIWidgetsSamples_2019_4/Assets/Script/ModelViewHelper.cs
  3. 2
      Samples/UIWidgetsSamples_2019_4/Assets/Script/Scene3DTest1.cs

4
Samples/UIWidgetsSamples_2019_4/Assets/Resources/CubPrefab.prefab


m_GameObject: {fileID: 606295237506465389}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_ClearFlags: 2
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0

2
Samples/UIWidgetsSamples_2019_4/Assets/Script/ModelViewHelper.cs


var gameObj = (GameObject) Instantiate(modelViewPrefab, Vector3.zero, Quaternion.identity);
var renderTexture = new RenderTexture(100, 100, 24);
var renderTexture = new RenderTexture(100, 100, 32);
gameObj.transform.Find("Camera").GetComponent<Camera>().targetTexture = renderTexture;

2
Samples/UIWidgetsSamples_2019_4/Assets/Script/Scene3DTest1.cs


children: new List<Widget>
{
new Lottie("wine.json", size: new Size(100, 100)),
new Container(width: 100, height: 100, child:new Texture(texture: text)),
new Container(width: 200, height: 200, color: Colors.red, child: new Center(child: new Container(width: 100, height: 100, child:new Texture(texture: text)))),
new Container(
width: 100,
height: 100,

正在加载...
取消
保存