Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

'' is an incorrect path for a scene file. BuildPlayer expects paths relative to the project folder. #26

Closed
Troshchuk opened this issue Aug 14, 2018 · 7 comments
Assignees

Comments

@Troshchuk
Copy link

When I try build instant app with button "Build for play console" I have error: " '' is an incorrect path for a scene file. BuildPlayer expects paths relative to the project folder. " Override Scenes (Optional) is empty. Could you investigate this issue? Thanks

@thanwah
Copy link
Contributor

thanwah commented Aug 14, 2018

Hi, thanks for filing this issue.

If you've been using release v0.7 of the plugin, my suspicion is that this may be an issue fixed by pull #20. I just released v0.8 of the plugin that includes the fixes from #20.

Do you mind trying release v0.8 to see if that fixes your issue?

Another possibility is that there is an issue with the selected scenes from Unity's Build Settings window. Do you mind sharing your Unity version as well as a screen shot of this window so I can see if anything looks unusual?

Thanks again.

@Troshchuk
Copy link
Author

Hi,

I tried v0.8 but the issue was not fixed.

I use Unity 2018.2.2f1 on Mac OS. Here you are screenshot: https://pasteboard.co/Hzi4lX4.png

Thanks.

@thanwah
Copy link
Contributor

thanwah commented Aug 15, 2018

Thanks for sharing your Unity version.

I apologize, but I was not clear when I requested a screenshot. What I had intended to request was the Build Settings windows. Is it possible for you to share a screenshot of those?

For example:
screen shot 2018-08-15 at 4 25 18 pm

@thanwah thanwah self-assigned this Aug 15, 2018
@Troshchuk
Copy link
Author

Here you are:
screen shot 2018-08-16 at 1 05 44 am

@thanwah
Copy link
Contributor

thanwah commented Aug 16, 2018

Thanks for sharing the screenshot. I don't see anything unusual in the images you shared.

I'm able to recreate the error message you see by setting scenesInBuild = new[] {" "}; in PlayInstantBuilder.CreateBuildPlayerOptions().

However, I'm not clear how the " " is showing up as a scene path in your case.

If you're willing to modify PlayInstantBuilder.CreateBuildPlayerOptions(), you could run the following:

var scenesInBuild = PlayInstantBuildConfiguration.ScenesInBuild;
Debug.LogFormat("Config scenes {0}: {1}", scenesInBuild.Length, string.Join(",", scenesInBuild));
if (scenesInBuild.Length == 0)
{
    scenesInBuild = GetEditorBuildEnabledScenes();
    Debug.LogFormat("Editor scenes {0}: {1}", scenesInBuild.Length, string.Join(",", scenesInBuild));
}

That would hopefully tell us where the mystery scene is coming from.

If it turns out to be from EditorBuildSettings and you're willing to clear your set of scenes, you could run this line of code one time:
EditorBuildSettings.scenes = new EditorBuildSettingsScene[0];

This would clear out the scenes in "Scenes in Build". Then you should be able to do "Add Open Scenes" to add your "Scenes/Menu" back to the list, and hopefully it would work going forward.

@960208781
Copy link

Check your "BuildPipeline.BuildPlayer" function, I caused by incorrect because levels of parameters

@Jamolinesca
Copy link

Hey!

I had this same problem. I realized that in my case with Jenkins, the EditorBuildSettings do not save like in your screenshot in wherever else you have the project opened. They get deleted.

So what I did is, I first let Jenkins clone the project. Then I open it in a Unity Editor (whatever version you project lives in) and then I add the scenes I want to build to the Build Settings. Then I run Jenkins again and it finally finds the scenes to build.

Hope that helps!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants