2222using PinMame ;
2323using UnityEditor ;
2424using UnityEngine ;
25- using VisualPinball . Engine . Common ;
26- using VisualPinball . Engine . Game . Engines ;
2725using VisualPinball . Engine . PinMAME . Games ;
2826using VisualPinball . Unity ;
2927using VisualPinball . Unity . Editor ;
@@ -43,7 +41,7 @@ public class PinMameGamelogicEngineInspector : UnityEditor.Editor
4341 private int _selectedGameIndex ;
4442 private int _selectedRomIndex ;
4543
46- private TableAuthoring _tableAuthoring ;
44+ private TableComponent _tableComponent ;
4745
4846 private PinMameRom Rom => _gle . Game . Roms [ _selectedRomIndex ] ;
4947
@@ -62,7 +60,7 @@ private void OnEnable()
6260 . ToArray ( ) ;
6361
6462 if ( _gle != null ) {
65- _tableAuthoring = _gle . gameObject . GetComponentInParent < TableAuthoring > ( ) ;
63+ _tableComponent = _gle . gameObject . GetComponentInParent < TableComponent > ( ) ;
6664 }
6765
6866 if ( IsGameSet ) {
@@ -124,13 +122,13 @@ public override void OnInspectorGUI()
124122 //EditorGUI.BeginDisabledGroup(!IsGameSet || Application.isPlaying);
125123 if ( GUILayout . Button ( "Populate Hardware" ) ) {
126124 if ( EditorUtility . DisplayDialog ( "PinMAME" , "This will clear all linked switches, coils and lamps and re-populate them. You sure you want to do that?" , "Yes" , "No" ) ) {
127- _tableAuthoring . RepopulateHardware ( _gle ) ;
125+ _tableComponent . RepopulateHardware ( _gle ) ;
128126 TableSelector . Instance . TableUpdated ( ) ;
129127 SceneView . RepaintAll ( ) ;
130128 }
131129 }
132130 if ( GUILayout . Button ( "Create Displays" ) ) {
133- var sceneDisplays = FindObjectsOfType < DisplayAuthoring > ( ) ;
131+ var sceneDisplays = FindObjectsOfType < DisplayComponent > ( ) ;
134132 if ( sceneDisplays . Length > 0 ) {
135133 if ( EditorUtility . DisplayDialog ( "PinMAME" , "This will re-position all your displays, if you have any. You sure you want to do that?" , "Yes" , "No" ) ) {
136134 CreateDisplays ( sceneDisplays ) ;
@@ -144,24 +142,24 @@ public override void OnInspectorGUI()
144142 //EditorGUI.EndDisabledGroup();
145143 }
146144
147- private void CreateDisplays ( IEnumerable < DisplayAuthoring > sceneDisplays )
145+ private void CreateDisplays ( IEnumerable < DisplayComponent > sceneDisplays )
148146 {
149147 // retrieve layouts from pinmame
150148 var pinMame = PinMame . PinMame . Instance ( AudioSettings . outputSampleRate ) ;
151149 var displayLayouts = pinMame . GetAvailableDisplays ( _gle . romId ) ;
152150
153151 // retrieve already existing displays from scene
154- var displayGameObjects = new Dictionary < string , DisplayAuthoring > ( ) ;
152+ var displayGameObjects = new Dictionary < string , DisplayComponent > ( ) ;
155153 foreach ( var displays in sceneDisplays ) {
156154 displayGameObjects [ displays . Id ] = displays ;
157155 }
158- var ta = _gle . GetComponentInParent < TableAuthoring > ( ) ;
159- var pa = _gle . GetComponentInChildren < PlayfieldAuthoring > ( ) ;
156+ var ta = _gle . GetComponentInParent < TableComponent > ( ) ;
157+ var pa = _gle . GetComponentInChildren < PlayfieldComponent > ( ) ;
160158 var tableHeight = 0f ;
161159 var tableWidth = 1f ;
162160 if ( ta ) {
163- tableHeight = pa . GlassHeight * PlayfieldAuthoring . GlobalScale ;
164- tableWidth = pa . Width * PlayfieldAuthoring . GlobalScale ;
161+ tableHeight = pa . GlassHeight * PlayfieldComponent . GlobalScale ;
162+ tableWidth = pa . Width * PlayfieldComponent . GlobalScale ;
165163 }
166164
167165 // get total height
@@ -195,8 +193,8 @@ private void CreateDisplays(IEnumerable<DisplayAuthoring> sceneDisplays)
195193
196194 if ( layout . IsDmd ) {
197195 var auth = ! displayGameObjects . ContainsKey ( id )
198- ? go . AddComponent < DotMatrixDisplayAuthoring > ( )
199- : go . GetComponent < DotMatrixDisplayAuthoring > ( ) ;
196+ ? go . AddComponent < DotMatrixDisplayComponent > ( )
197+ : go . GetComponent < DotMatrixDisplayComponent > ( ) ;
200198
201199 auth . Id = id ;
202200 auth . Width = layout . Width ;
@@ -208,8 +206,8 @@ private void CreateDisplays(IEnumerable<DisplayAuthoring> sceneDisplays)
208206
209207 } else {
210208 var auth = ! displayGameObjects . ContainsKey ( id )
211- ? go . AddComponent < SegmentDisplayAuthoring > ( )
212- : go . GetComponent < SegmentDisplayAuthoring > ( ) ;
209+ ? go . AddComponent < SegmentDisplayComponent > ( )
210+ : go . GetComponent < SegmentDisplayComponent > ( ) ;
213211
214212 auth . Id = id ;
215213 auth . NumChars = layout . Length ;
0 commit comments