浏览代码

Fix error in FX editor

trethaller 6 年之前
父节点
当前提交
1554478781
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      hide/comp/SceneEditor.hx

+ 6 - 1
hide/comp/SceneEditor.hx

@@ -759,7 +759,12 @@ class SceneEditor {
 
 	public function getContext(elt : PrefabElement) {
 		if(elt == null) return null;
-		if(elt == sceneData) return context;
+		var ctx = null;
+		if(elt == sceneData) {
+			ctx = context.shared.contexts.get(sceneData);
+			if(ctx != null) return ctx; // Some libs make their own instances
+			return context;
+		}
 		return context.shared.contexts.get(elt);
 	}