浏览代码

refine antiAliasing.

/main
kg 6 年前
当前提交
91ed3f2d
共有 12 个文件被更改,包括 578 次插入64 次删除
  1. 10
      Runtime/editor/editor_window.cs
  2. 3
      Runtime/editor/rasterizer.cs
  3. 39
      Runtime/editor/surface.cs
  4. 4
      Runtime/engine/UIWidgetsPanel.cs
  5. 23
      Runtime/flow/compositor_context.cs
  6. 1
      Runtime/flow/layer.cs
  7. 8
      Runtime/flow/layer_tree.cs
  8. 2
      Runtime/flow/picture_layer.cs
  9. 29
      Runtime/flow/raster_cache.cs
  10. 12
      Runtime/ui/painting/canvas_impl.cs
  11. 504
      Samples/UIWidgetsGallery/gallery.unity
  12. 7
      Samples/UIWidgetsGallery/gallery.unity.meta

10
Runtime/editor/editor_window.cs


public void OnEnable() {
this._devicePixelRatio = this.queryDevicePixelRatio();
this._antiAliasing = this.queryAntiAliasing();
var size = this.queryWindowSize();
this._lastWindowWidth = size.x;
this._lastWindowHeight = size.y;

return true;
}
if (this._antiAliasing != this.queryAntiAliasing()) {
return true;
}
var size = this.queryWindowSize();
if (this._lastWindowWidth != size.x
|| this._lastWindowHeight != size.y) {

using (this.getScope()) {
if (this.displayMetricsChanged()) {
this._devicePixelRatio = this.queryDevicePixelRatio();
this._antiAliasing = this.queryAntiAliasing();
var size = this.queryWindowSize();
this._lastWindowWidth = size.x;
this._lastWindowHeight = size.y;

protected abstract Vector2 queryWindowSize();
protected virtual Surface createSurface() {
return new EditorWindowSurface(antiAliasing: this.antiAliasing);
return new WindowSurfaceImpl();
}
void _beginFrame() {

layerTree.frameSize = this._physicalSize;
layerTree.devicePixelRatio = this._devicePixelRatio;
layerTree.antiAliasing = this._antiAliasing;
this._rasterizer.draw(layerTree);
}

3
Runtime/editor/rasterizer.cs


bool _drawToSurface(LayerTree layerTree) {
D.assert(this._surface != null);
var frame = this._surface.acquireFrame(layerTree.frameSize, layerTree.devicePixelRatio);
var frame = this._surface.acquireFrame(
layerTree.frameSize, layerTree.devicePixelRatio, layerTree.antiAliasing);
if (frame == null) {
return false;
}

39
Runtime/editor/surface.cs


}
public interface Surface : IDisposable {
SurfaceFrame acquireFrame(Size size, float devicePixelRatio);
SurfaceFrame acquireFrame(Size size, float devicePixelRatio, int antiAliasing);
int getAntiAliasing();
public class EditorWindowSurface : Surface {
public class WindowSurfaceImpl : Surface {
static Material _guiTextureMat;
static Material _uiDefaultMat;

GrSurface _surface;
readonly DrawToTargetFunc _drawToTargetFunc;
MeshPool _meshPool = new MeshPool();
int _antiAliasing;
public int getAntiAliasing() {
return this._antiAliasing;
}
public EditorWindowSurface(DrawToTargetFunc drawToTargetFunc = null, int antiAliasing = Window.defaultAntiAliasing) {
public WindowSurfaceImpl(DrawToTargetFunc drawToTargetFunc = null) {
this._antiAliasing = antiAliasing;
public SurfaceFrame acquireFrame(Size size, float devicePixelRatio) {
this._createOrUpdateRenderTexture(size, devicePixelRatio);
public SurfaceFrame acquireFrame(Size size, float devicePixelRatio, int antiAliasing) {
this._createOrUpdateRenderTexture(size, devicePixelRatio, antiAliasing);
return new SurfaceFrame(this._surface,
(frame, canvas) => this._presentSurface(canvas));

return true;
}
void _createOrUpdateRenderTexture(Size size, float devicePixelRatio) {
void _createOrUpdateRenderTexture(Size size, float devicePixelRatio, int antiAliasing) {
&& this._surface.getRenderTexture() != null) {
&& this._surface.antiAliasing == antiAliasing
&& this._surface.getRenderTexture() != null) {
return;
}

}
this._surface = new GrSurface(size, devicePixelRatio, this._meshPool, this._antiAliasing);
this._surface = new GrSurface(size, devicePixelRatio, antiAliasing, this._meshPool);
}
}

public readonly float devicePixelRatio;
public readonly int antiAliasing;
readonly MeshPool _meshPool;

int _antiAliasing;
public int getAntiAliasing() {
return this._antiAliasing;
}
public RenderTexture getRenderTexture() {
return this._renderTexture;
}

this._canvas = new CommandBufferCanvas(
this._renderTexture, this.devicePixelRatio, this._meshPool, this._antiAliasing);
this._renderTexture, this.devicePixelRatio, this._meshPool);
public GrSurface(Size size, float devicePixelRatio, MeshPool meshPool, int antiAliasing = Window.defaultAntiAliasing) {
public GrSurface(Size size, float devicePixelRatio, int antiAliasing, MeshPool meshPool) {
this._antiAliasing = antiAliasing;
this.antiAliasing = antiAliasing;
var desc = new RenderTextureDescriptor(
(int) this.size.width, (int) this.size.height,

4
Runtime/engine/UIWidgetsPanel.cs


}
protected override Surface createSurface() {
return new EditorWindowSurface(this._uiWidgetsPanel.applyRenderTexture, this._antiAliasing);
return new WindowSurfaceImpl(this._uiWidgetsPanel.applyRenderTexture);
}
public override GUIContent titleContent {

public int antiAliasing {
get {
return this.antiAliasingOverride >= 0 ? this.antiAliasingOverride : Window.defaultAntiAliasing;
return this.antiAliasingOverride >= 0 ? this.antiAliasingOverride : QualitySettings.antiAliasing;
}
}

23
Runtime/flow/compositor_context.cs


public class ScopedFrame : IDisposable {
readonly CompositorContext _context;
readonly Canvas _canvas;
readonly bool _instrumentation_enabled;
readonly bool _instrumentationEnabled;
public ScopedFrame(CompositorContext context, Canvas canvas, bool instrumentation_enabled) {
public ScopedFrame(CompositorContext context, Canvas canvas, bool instrumentationEnabled) {
this._instrumentation_enabled = instrumentation_enabled;
this._context._beginFrame(this, this._instrumentation_enabled);
this._instrumentationEnabled = instrumentationEnabled;
this._context._beginFrame(this, this._instrumentationEnabled);
}
public CompositorContext context() {

}
public void Dispose() {
this._context._endFrame(this, this._instrumentation_enabled);
this._context._endFrame(this, this._instrumentationEnabled);
}
}

this._frameTime = new Stopwatch();
}
public ScopedFrame acquireFrame(Canvas canvas, bool instrumentation_enabled) {
return new ScopedFrame(this, canvas, instrumentation_enabled);
public ScopedFrame acquireFrame(Canvas canvas, bool instrumentationEnabled) {
return new ScopedFrame(this, canvas, instrumentationEnabled);
this._rasterCache.antiAliasing = surface.getAntiAliasing();
}
public void onGrContextDestroyed() {

return this._frameTime;
}
void _beginFrame(ScopedFrame frame, bool enable_instrumentation) {
if (enable_instrumentation) {
void _beginFrame(ScopedFrame frame, bool enableInstrumentation) {
if (enableInstrumentation) {
void _endFrame(ScopedFrame frame, bool enable_instrumentation) {
void _endFrame(ScopedFrame frame, bool enableInstrumentation) {
if (enable_instrumentation) {
if (enableInstrumentation) {
this._frameTime.stop();
}
}

1
Runtime/flow/layer.cs


public class PrerollContext {
public RasterCache rasterCache;
public float devicePixelRatio;
public int antiAliasing;
public Rect cullRect;
public Stopwatch frameTime;
}

8
Runtime/flow/layer_tree.cs


get { return this._devicePixelRatio; }
set { this._devicePixelRatio = value; }
}
int _antiAliasing;
public int antiAliasing {
get { return this._antiAliasing; }
set { this._antiAliasing = value; }
}
static readonly Matrix3 _identityMatrix = Matrix3.I();

devicePixelRatio = frame.canvas().getDevicePixelRatio(),
antiAliasing = this.antiAliasing,
cullRect = Rect.largest,
frameTime = frame.context().frameTime()
};

2
Runtime/flow/picture_layer.cs


ctm[5] = ctm[5].alignToPixel(context.devicePixelRatio);
this._rasterCacheResult = context.rasterCache.getPrerolledImage(
this._picture, ctm, context.devicePixelRatio, this._isComplex, this._willChange);
this._picture, ctm, context.devicePixelRatio, context.antiAliasing, this._isComplex, this._willChange);
} else {
this._rasterCacheResult = null;
}

29
Runtime/flow/raster_cache.cs


}
class _RasterCacheKey : IEquatable<_RasterCacheKey> {
internal _RasterCacheKey(Picture picture, Matrix3 matrix, float devicePixelRatio) {
internal _RasterCacheKey(Picture picture, Matrix3 matrix, float devicePixelRatio, int antiAliasing) {
D.assert(picture != null);
D.assert(matrix != null);
this.picture = picture;

this.matrix[2] = 0.0f;
this.matrix[5] = 0.0f;
this.devicePixelRatio = devicePixelRatio;
this.antiAliasing = antiAliasing;
}
public readonly Picture picture;

public readonly float devicePixelRatio;
public readonly int antiAliasing;
public bool Equals(_RasterCacheKey other) {
if (ReferenceEquals(null, other)) {
return false;

return Equals(this.picture, other.picture) &&
Equals(this.matrix, other.matrix) &&
this.devicePixelRatio.Equals(other.devicePixelRatio);
this.devicePixelRatio.Equals(other.devicePixelRatio) &&
this.antiAliasing.Equals(other.antiAliasing);
}
public override bool Equals(object obj) {

var hashCode = (this.picture != null ? this.picture.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (this.matrix != null ? this.matrix.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ this.devicePixelRatio.GetHashCode();
hashCode = (hashCode * 397) ^ this.antiAliasing.GetHashCode();
return hashCode;
}
}

readonly Dictionary<_RasterCacheKey, _RasterCacheEntry> _cache;
MeshPool _meshPool;
public int antiAliasing {
set { this._antiAliasing = value; }
}
int _antiAliasing = Window.defaultAntiAliasing;
Picture picture, Matrix3 transform, float devicePixelRatio, bool isComplex, bool willChange) {
Picture picture, Matrix3 transform, float devicePixelRatio, int antiAliasing, bool isComplex, bool willChange) {
if (this.threshold == 0) {
return null;
}

return null;
}
_RasterCacheKey cacheKey = new _RasterCacheKey(picture, transform, devicePixelRatio);
_RasterCacheKey cacheKey = new _RasterCacheKey(picture, transform, devicePixelRatio, antiAliasing);
var entry = this._cache.putIfAbsent(cacheKey, () => new _RasterCacheEntry());

if (entry.image == null) {
D.assert(this._meshPool != null);
entry.image = this._rasterizePicture(picture, transform, devicePixelRatio, this._meshPool);
entry.image = this._rasterizePicture(picture, transform, devicePixelRatio, antiAliasing, this._meshPool);
}
return entry.image;

}
RasterCacheResult _rasterizePicture(Picture picture, Matrix3 transform, float devicePixelRatio,
MeshPool meshPool) {
int antiAliasing, MeshPool meshPool) {
var bounds = transform.mapRect(picture.paintBounds).roundOut(devicePixelRatio);
var desc = new RenderTextureDescriptor(

autoGenerateMips = false,
};
if (this._antiAliasing != 0) {
desc.msaaSamples = this._antiAliasing;
if (antiAliasing != 0) {
desc.msaaSamples = antiAliasing;
var canvas = new CommandBufferCanvas(renderTexture, devicePixelRatio, meshPool, this._antiAliasing);
var canvas = new CommandBufferCanvas(renderTexture, devicePixelRatio, meshPool);
canvas.translate(-bounds.left, -bounds.top);
canvas.concat(transform);
canvas.drawPicture(picture);

12
Runtime/ui/painting/canvas_impl.cs


readonly float _fringeWidth;
readonly float _devicePixelRatio;
readonly MeshPool _meshPool;
readonly int _antiAliasing;
public PictureFlusher(RenderTexture renderTexture, float devicePixelRatio, MeshPool meshPool, int antiAliasing) {
public PictureFlusher(RenderTexture renderTexture, float devicePixelRatio, MeshPool meshPool) {
D.assert(renderTexture);
D.assert(devicePixelRatio > 0);
D.assert(meshPool != null);

this._devicePixelRatio = devicePixelRatio;
this._meshPool = meshPool;
this._antiAliasing = antiAliasing;
}
public float getDevicePixelRatio() {

autoGenerateMips = false,
};
if (this._antiAliasing != 0) {
desc.msaaSamples = this._antiAliasing;
if (this._renderTexture.antiAliasing != 0) {
desc.msaaSamples = this._renderTexture.antiAliasing;
}
cmdBuf.GetTemporaryRT(subLayer.rtID, desc, subLayer.filterMode);

public class CommandBufferCanvas : RecorderCanvas {
readonly PictureFlusher _flusher;
public CommandBufferCanvas(RenderTexture renderTexture, float devicePixelRatio, MeshPool meshPool, int antiAliasing = Window.defaultAntiAliasing)
public CommandBufferCanvas(RenderTexture renderTexture, float devicePixelRatio, MeshPool meshPool)
this._flusher = new PictureFlusher(renderTexture, devicePixelRatio, meshPool, antiAliasing);
this._flusher = new PictureFlusher(renderTexture, devicePixelRatio, meshPool);
}
public override float getDevicePixelRatio() {

504
Samples/UIWidgetsGallery/gallery.unity


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657892, g: 0.4964127, b: 0.5748172, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 10
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ShowResolutionOverlay: 1
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &242452675
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 242452676}
- component: {fileID: 242452678}
- component: {fileID: 242452677}
m_Layer: 5
m_Name: gallery
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &242452676
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 242452675}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1248027221}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &242452677
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 242452675}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9c5c86936ca864ae684720ddcd50d759, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Texture: {fileID: 0}
m_UVRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
devicePixelRatioOverride: 0
antiAliasingOverride: 4
--- !u!222 &242452678
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 242452675}
m_CullTransparentMesh: 0
--- !u!1 &1152820164
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1152820167}
- component: {fileID: 1152820166}
- component: {fileID: 1152820165}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1152820165
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1152820164}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &1152820166
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1152820164}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &1152820167
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1152820164}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1248027217
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1248027221}
- component: {fileID: 1248027220}
- component: {fileID: 1248027219}
- component: {fileID: 1248027218}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1248027218
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1248027217}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1248027219
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1248027217}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!223 &1248027220
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1248027217}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &1248027221
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1248027217}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 242452676}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1 &1304413924
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1304413926}
- component: {fileID: 1304413925}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &1304413925
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1304413924}
m_Enabled: 1
serializedVersion: 8
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1304413926
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1304413924}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &1396321320
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1396321323}
- component: {fileID: 1396321322}
- component: {fileID: 1396321321}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1396321321
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1396321320}
m_Enabled: 1
--- !u!20 &1396321322
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1396321320}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_GateFitMode: 2
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1396321323
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1396321320}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

7
Samples/UIWidgetsGallery/gallery.unity.meta


fileFormatVersion: 2
guid: 97d82ba0e79874aee90750ac8d1661bc
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存