소스 검색

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) {
 	public function getContext(elt : PrefabElement) {
 		if(elt == null) return null;
 		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);
 		return context.shared.contexts.get(elt);
 	}
 	}