Преглед на файлове

Fix emitter selection display

trethaller преди 7 години
родител
ревизия
b113e3b092
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      hide/prefab/fx/Emitter.hx

+ 6 - 0
hide/prefab/fx/Emitter.hx

@@ -443,6 +443,12 @@ class Emitter extends Object3D {
 			Reflect.setField(props, param.name, param.def);
 	}
 
+	override function setSelected( ctx : Context, b : Bool ) {
+		var emitterObj = Std.instance(ctx.local3d, EmitterObject);
+		var debugShape : h3d.scene.Object = emitterObj.find(c -> if(c.name == "_highlight") c else null);
+		debugShape.visible = b;		
+	}
+
 	override function updateInstance( ctx: Context, ?propName : String ) {
 		super.updateInstance(ctx, propName);
 		var emitterObj = Std.instance(ctx.local3d, EmitterObject);