Skip to content

Commit 7877d3b

Browse files
committed
dmd: Init and position correctly when auto-creating.
1 parent 191f5a0 commit 7877d3b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

VisualPinball.Engine.PinMAME.Unity/Editor/PinMameGamelogicEngineInspector.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,16 +193,24 @@ private void CreateDisplays(IEnumerable<DisplayAuthoring> sceneDisplays)
193193
var auth = !displayGameObjects.ContainsKey(id)
194194
? go.AddComponent<DmdAuthoring>()
195195
: go.GetComponent<DmdAuthoring>();
196+
196197
auth.Id = id;
198+
auth.Width = layout.width;
199+
auth.Height = layout.height;
200+
201+
go.name = "Dot Matrix Display";
202+
go.transform.localScale = new Vector3(DisplayInspector.GameObjectScale, DisplayInspector.GameObjectScale, DisplayInspector.GameObjectScale);
203+
go.transform.localPosition = new Vector3(0f, tableHeight, 1.1f);
197204

198205
} else {
199206
var auth = !displayGameObjects.ContainsKey(id)
200207
? go.AddComponent<SegmentDisplayAuthoring>()
201208
: go.GetComponent<SegmentDisplayAuthoring>();
202-
auth.Id = id;
203-
go.name = $"Segment Display [{index}]";
204209

210+
auth.Id = id;
205211
auth.NumChars = layout.length;
212+
213+
go.name = $"Segment Display [{index}]";
206214
go.transform.localScale = new Vector3(DisplayInspector.GameObjectScale, DisplayInspector.GameObjectScale, DisplayInspector.GameObjectScale);
207215
var mesh = go.GetComponent<MeshFilter>().sharedMesh;
208216
var charHeight = mesh.bounds.size.y * DisplayInspector.GameObjectScale;

0 commit comments

Comments
 (0)