@@ -38,25 +38,25 @@ private static void CreateBlueprintProjector()
38
38
Undo . RegisterCreatedObjectUndo ( bluePrintProjector , "Blueprint Decal" ) ;
39
39
40
40
// find table and parent
41
- TableAuthoring ta ;
41
+ TableComponent tableComp ;
42
42
Transform parent ;
43
43
44
44
// if nothing selected, use active table
45
45
if ( Selection . activeGameObject == null ) {
46
- ta = TableSelector . Instance . SelectedTable ;
46
+ tableComp = TableSelector . Instance . SelectedTable ;
47
47
parent = bluePrintProjector . transform . root ;
48
48
49
49
} else {
50
50
// otherwise, find parent in hierarchy
51
- ta = Selection . activeGameObject . GetComponentInParent < TableAuthoring > ( ) ;
51
+ tableComp = Selection . activeGameObject . GetComponentInParent < TableComponent > ( ) ;
52
52
parent = Selection . activeGameObject . transform ;
53
53
54
54
// if none in hierarchy, fall back to active table
55
- if ( ta == null ) {
56
- ta = TableSelector . Instance . SelectedTable ;
55
+ if ( tableComp == null ) {
56
+ tableComp = TableSelector . Instance . SelectedTable ;
57
57
}
58
58
}
59
- if ( ta == null ) {
59
+ if ( tableComp == null ) {
60
60
EditorUtility . DisplayDialog (
61
61
"Blueprint Projector" ,
62
62
"No table found in scene. The blueprint projector only works with a table." ,
@@ -65,7 +65,7 @@ private static void CreateBlueprintProjector()
65
65
}
66
66
67
67
// adjust parameters
68
- var playfieldAuthoring = ta . GetComponentInChildren < PlayfieldAuthoring > ( ) ;
68
+ var playfieldAuthoring = tableComp . GetComponentInChildren < PlayfieldComponent > ( ) ;
69
69
bluePrintProjector . transform . SetParent ( parent , true ) ;
70
70
var extents = playfieldAuthoring . GetComponent < MeshRenderer > ( ) . bounds . extents ;
71
71
var center = playfieldAuthoring . GetComponent < MeshRenderer > ( ) . bounds . center ;
0 commit comments