Refactor scene exit handling in App.tsx
This commit is contained in:
@@ -6147,11 +6147,6 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
modelAssetId?: string | null;
|
modelAssetId?: string | null;
|
||||||
} = {}
|
} = {}
|
||||||
) => {
|
) => {
|
||||||
if (kind === "sceneExit" && resolveDefaultSceneExitDestination() === null) {
|
|
||||||
setStatusMessage("Author a Scene Entry before placing a Scene Exit.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
beginCreation(
|
beginCreation(
|
||||||
{
|
{
|
||||||
kind: "create",
|
kind: "create",
|
||||||
@@ -6190,7 +6185,7 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const resolveDefaultSceneExitDestination = (
|
const resolveDefaultSceneTransitionTarget = (
|
||||||
preferredSceneId = editorState.activeSceneId
|
preferredSceneId = editorState.activeSceneId
|
||||||
): {
|
): {
|
||||||
targetSceneId: string;
|
targetSceneId: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user