You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.warn(`AnimatedSprite <${this.name}> attached to ${this.parent?.name} does not have a Transform component. Skipping rendering. This will only show once.`);
244
+
this.top?.warn(`AnimatedSprite <${this.name}> attached to ${this.parent?.name} does not have a Transform component. Skipping rendering. This will only show once.`);
245
245
this.hasWarnedAboutTransform=true;
246
246
}
247
247
return;
@@ -262,7 +262,7 @@ export class AnimatedSprite extends Renderer {
console.warn(`Frame (${this.currentAnimation}) index ${this.currentFrameIndex} does not exist for animated sprite <${this.name}> attached to ${this.parent?.name}.`);
265
+
this.top?.warn(`Frame (${this.currentAnimation}) index ${this.currentFrameIndex} does not exist for animated sprite <${this.name}> attached to ${this.parent?.name}.`);
266
266
}
267
267
}else{
268
268
thrownewError(`AnimatedSprite <${this.name}> attached to ${this.parent?.name} does not have a context to render to. Ensure it is added to a Game, Scene, or Layer with a game ancestor.`);
Copy file name to clipboardExpand all lines: Parts/Children/Collider.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ export class Collider extends Part {
13
13
onMount(parent: Part){
14
14
super.onMount(parent);
15
15
if(!this.sibling("Transform")){
16
-
console.warn(
16
+
this.top?.warn(
17
17
`Collider <${this.name}> (${this.id}) does not have Transform sibling. Please ensure you add a Transform component before adding a Collider. It will not technically effect functionality, but it is good practice.`
Copy file name to clipboardExpand all lines: Parts/Children/PolygonCollider.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ export class PolygonCollider extends Collider {
25
25
super.onMount(parent);
26
26
27
27
if(!this.sibling("Transform")){
28
-
console.warn(
28
+
this.top?.warn(
29
29
`PolygonCollider <${this.name}> (${this.id}) is not attached to a parent with a Transform component. Please ensure it is mounted to a GameObject with a Transform`
30
30
);
31
31
return;
@@ -39,7 +39,7 @@ export class PolygonCollider extends Collider {
39
39
super.act(delta);
40
40
41
41
if(!this.sibling("Transform")){
42
-
console.warn(
42
+
this.top?.warn(
43
43
`PolygonCollider <${this.name}> (${this.id}) is not attached to a parent with a Transform component. Skipping`
44
44
);
45
45
return;
@@ -121,7 +121,7 @@ export class PolygonCollider extends Collider {
121
121
}elseif(otherinstanceofPolygonCollider){
122
122
returnthis.checkPolygonVsPolygon(this,other);
123
123
}
124
-
console.warn("Collision checks are only supported between BoxColliders and PolygonColliders.");
124
+
this.top?.warn("Collision checks are only supported between BoxColliders and PolygonColliders.");
0 commit comments