Browse Source

Fixed default sprite with no material.

Mark Sibly 6 years ago
parent
commit
775b020a88
1 changed files with 4 additions and 1 deletions
  1. 4 1
      modules/mojo3d/scene/entities/sprite.monkey2

+ 4 - 1
modules/mojo3d/scene/entities/sprite.monkey2

@@ -26,9 +26,12 @@ Class Sprite Extends Renderable
 		
 		Super.New( parent )
 		
+		Global _defaultMaterial:=New SpriteMaterial
+		
 		Name="Sprite"
+		Material=_defaultMaterial
 		
-		AddInstance()
+		AddInstance( New Variant[]( parent ) )
 		
 		Visible=True
 	End