组件截图时报空
RequestorId++; //此时是1025
PainterBg bg = PainterBg.CreateInstance(); //创建某个界面组件当背景
bg.AddChild(com); //添加我传入的某个组件作为子物体
com.Center(); //居中对齐
//下面是按照示例代码写的
DisplayObject com_Shot = bg.displayObject;
com_Shot.EnterPaintingMode(RequestorId, null);
yield return null;
//断点调试此时的com_Shot.paintingGraphics.texture报空
tex = (RenderTexture)com_Shot.paintingGraphics.texture.nativeTexture;
ComTexDic.Add(com.name,tex);
com_Shot.LeavePaintingMode(RequestorId);
PainterBg bg = PainterBg.CreateInstance(); //创建某个界面组件当背景
bg.AddChild(com); //添加我传入的某个组件作为子物体
com.Center(); //居中对齐
//下面是按照示例代码写的
DisplayObject com_Shot = bg.displayObject;
com_Shot.EnterPaintingMode(RequestorId, null);
yield return null;
//断点调试此时的com_Shot.paintingGraphics.texture报空
tex = (RenderTexture)com_Shot.paintingGraphics.texture.nativeTexture;
ComTexDic.Add(com.name,tex);
com_Shot.LeavePaintingMode(RequestorId);
没有找到相关结果
已邀请:
1 个回复
谷主
赞同来自: