Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

No primary surface Render Mode. No cameras in Scene

Discussion in 'Project Tiny' started by roadis, Jun 6, 2020.

  1. roadis

    roadis

    Joined:
    Jul 3, 2012
    Posts:
    43
    Hi,
    I try to use the Tiny Racing example.

    I made my own Scene and added some stuff.

    When i try to Build and Run Windows-ll2cpp i get this error when starting:

    upload_2020-6-6_14-3-46.png

    I have added my camera as in the example
    upload_2020-6-6_14-7-32.png

    What can I do to debug what is wrong? Btw. Android and so blacksecreen and nothing to show.

    Using Project Tiny Full Version 0.26.0
     
  2. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    922
    Hello @roadis,
    When you are seeing this error it means that no camera is available to render in the executable, or that there is something preventing you from loading assets / rendering in runtime.

    Here are a few steps you can take to pin point the issue:
    - In your build configurations, double check that your rightSide scene is in the Scene List
    - Check that when you are running your build, no errors or warnings are showing in the Unity console
    - You can generate a C# DOTS solution for runtime debugging. Go to Assets > Generate DOTS C# Solution and generate the solution in the popup window. With this solution, you can build the executable and place break points to make sure that your systems are running

    Start with these steps, and we can take it from there. Let me know your progress!
     
  3. roadis

    roadis

    Joined:
    Jul 3, 2012
    Posts:
    43
    First of all thanks for the reply.

    - In your build configurations, double check that your rightSide scene is in the Scene List
    Does this need to be? I don't see that in the normal TinyRacing. There is just the normal scene and not the Subscene. But I tried both that didn't work

    - Check that when you are running your build, no errors or warnings are showing in the Unity console
    I have some little warning but they don't come when I Build only at start of Unity.
    OK I found some errors that came from wrong assambly configuration. And I can't fix them. Goes over my head at the moment.
    But when i delete it and use an empty one to build&run it should still build the scene right? And in the scene there is a camera as you see at top...

    Are there information about how to do the assambly configuration with hybrid rendering and some GenerateAuthoringComponent?

    In the editor everything works fine. Just not Build&Run
     
  4. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    922
    Hello @roadis,

    In your build configurations, double check that your rightSide scene is in the Scene List
    Does this need to be? I don't see that in the normal TinyRacing. There is just the normal scene and not the Subscene. But I tried both that didn't work

    Sorry my bad. You are correct that the scene (not subscene) should be in the scene list slot.

    Regarding the errors you are seeing, could you post them here? That would help finding out the issue.

    But when i delete it and use an empty one to build&run it should still build the scene right? And in the scene there is a camera as you see at top...
    I don't quite follow this. What was deleted? We have a Setting up a new project section in our documentation. Maybe it can help you see if any assemblies are missing in your root assembly.

    Are there information about how to do the assambly configuration with hybrid rendering and some GenerateAuthoringComponent?
    If you would like to build a hybrid build rather than a tiny build, you need to create a new build configuration. Set it up like the following image:
    HybridBuild.png
    Note: We have heard about issues with building a hybrid build in a project which also contains the Tiny packages. We are currently looking into this issue. If you meet this issue, download the hybrid renderer package in a new project and try it there without any tiny packages.

    Keep me posted on your progress!
     
  5. roadis

    roadis

    Joined:
    Jul 3, 2012
    Posts:
    43
    Ok I tried to do minimum configuration.
    So i checked out a new Projekt with the Universal Render Pipeline. Then I have added Projekt Tiny.

    I copied the Camera to a new Subscene and added a assambly configuration

    Code (CSharp):
    1. {
    2.   "name": "test",
    3.   "references": [
    4.     "Unity.Burst",
    5.     "Unity.Entities",
    6.     "Unity.Mathematics",
    7.     "Unity.Transforms",
    8.     "Unity.Tiny.Core",
    9.     "Unity.Tiny.Rendering",
    10.     "Unity.Tiny.Input",
    11.     "Unity.Tiny.RendererExtras",
    12.     "Unity.Tiny.Animation"
    13.   ],
    14.   "includePlatforms": [],
    15.   "excludePlatforms": [],
    16.   "allowUnsafeCode": false,
    17.   "overrideReferences": false,
    18.   "precompiledReferences": [],
    19.   "autoReferenced": true,
    20.   "defineConstraints": [],
    21.   "versionDefines": [],
    22.   "noEngineReferences": false
    23. }
    Used the Build configuration from other Projekt.

    upload_2020-6-17_18-11-16.png

    . Btw. I personaly hate the Assambly Configuration. Comming from a Java background and having package manager like maven and gradle. This looks like hell and every time I enter a line of Code everything has to be Rebuild? And I can't use Unity for like a minute?
    Feels bad to use it.

    Btw. I can give you the empty project if you want.
     
  6. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    922
    @roadis, yeah I think it will be the best if you can DM me your project so I can have a look into what is going on. Thank you for your patience and sorry for for the inconvenience cause.

    Regarding the assembly setup Project Tiny is using, this is how we can let the users decide exactly what should go into the final executable. It is good to hear your feedback on this flow, and the re-compilation and editor freeze up is a concern. Does this happen every time you make a change to any of your code files?
     
  7. roadis

    roadis

    Joined:
    Jul 3, 2012
    Posts:
    43
    Btw. Thank you very much for the help. I don't take it for granted that a Developer takes on the small people ;)

    About the Projekt assambly. So what the user usually want (correct me if I'm wrong) All the Imports that are used go into the Projekt Assambly. Everything else doesn't need to be in there. And if you don't want specific Packages then you could make a ignore file. Or an Ignore Assambly file right? Everything else just adds a layer of complexity. And I think its not that complicated for some code to look up references.

    For the other part I just created a repo.
    https://github.com/Roadis/testforted/tree/master/Assets

    btw. I had it working some day. Then i tried adding a simple script like this.
    Code (CSharp):
    1. using Unity.Entities;
    2.  
    3. namespace TinyRacing
    4. {
    5.     [GenerateAuthoringComponent]
    6.     public struct AI : IComponentData
    7.     {
    8.         public float NormalDistanceFromTrack;
    9.     }
    10. }
    11.  
    But I found out that I have to build 2 Assamlby configurations for that.
    Couldn't get it to work.But that could also be a problem of my limit understanding on the Assamlby stuff
     
    Last edited: Jun 19, 2020
    NotaNaN likes this.
  8. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    922
    Anytime! We try to help as many developers as we can :)

    With Project Tiny, we want you (the developer) to be able to choose exactly what goes into which build. Let's say you create a MacOS build and an iOS build. These two builds requires slightly different libraries, from input, to the way the audio works, to other features you developed that you want enabled in one build, but not the other. With the assembly approach we are testing out with Project Tiny, this flow is very transparent.
    But like I wrote in the previous post, it is great to hear your thoughts about this flow. We want to make it as logical and easy to work with as possible, while still maintaining that transparency which this system provides.

    Great! What did you change in order to make it all work?

    For more on assemblies, and how it works in Project Tiny, have a look at the following links:
    The "Root Assembly"
    Authoring and Editor-only Code
    Also, do view the project structure in the samples located in our Project Tiny Samples Repo

    Let me know how it goes!
     
    NotaNaN likes this.
  9. croixbk

    croixbk

    Joined:
    Aug 16, 2015
    Posts:
    5
    Same problem here, using TinyRacing sample created a empty scene to test, followed the clean setup guide on the doc, but i did not recreate anything that was already in the project.
    The part i don't get is why the original scene works just fine, even if i put my test entity inside because both are working on the editor, i was trying to go the hardest way to understand the workflow better, so a explanation of the problem would be great, and if you need my project as well i would be happy to give it.
     
  10. roadis

    roadis

    Joined:
    Jul 3, 2012
    Posts:
    43
    Yeah also couldn't get it to work again :/
     
  11. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    922
    Sorry to see that the setup is a bit of a struggle. Let's dive into it together and see what goes wrong.
    Could both of you share your current projects (remove the Library folder for smaller zip size)? Then I can more easily see where you are in your setup.

    Thank you, and sorry for the inconvenience.
     
  12. croixbk

    croixbk

    Joined:
    Aug 16, 2015
    Posts:
    5
    Hello @Ted_Wikman thanks for the response.
    I managed to get it working by following the steps below:
    • You need to add AutoMovingDirectionalLight component and reference the Main camera to your Directional light game object
    • Make sure the camera background sold color alpha is set to 255 and not transparent
    source : https://forum.unity.com/threads/no-cameras-in-scene.937724/#post-6135320

    I did not found anything about these steps on the doc or an explanation of why they need to be followed, i assume it some temporary stuff, but, unless i missed this part, i believe it would be a good idea to add these steps in the documentation until is not needed since many people seems to be getting this problem.
     
  13. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    922
    Great that you got it all working, and thanks for sharing the missing pieces. We will make sure it gets added to the doc.
    To give some insight into the changes you made:
    - AutoMovingDirectionalLight: This component update the direction lights position and size with respect to world bounds and view frustum, to keep the shadow map to an optimal size. This component can be omitted if you want to set these values up by yourself. A use case when you might want to set this up by yourself would be if you are using a shadow cookie texture to visualize scrolling clouds for example.
    - Camera background color, alpha set to 255: When you create a new scene, the default color of the camera is 49, 77, 121, 0. For normal Unity builds, this works great. In Tiny however, we also take into account the alpha channel in the background color. Leaving the alpha at 0 will give you a black background color.

    Keep us posted on your progress, and let us know if you have any more questions or suggestions!
     
    croixbk likes this.
  14. roadis

    roadis

    Joined:
    Jul 3, 2012
    Posts:
    43
    After Updating too 2020.1 I've got a error message.
    Code (CSharp):
    1. The PhysicsCollider component is defined in the Unity.Physics assembly, but that assembly is not referenced by the current build configuration. Either add it as a reference, or ensure that the conversion process that is adding that component does not run.
    2. UnityEngine.Debug:LogError(Object)
    3. Unity.Debug:LogError(Object) (at Library/PackageCache/com.unity.entities@0.13.0-preview.24/Unity.Entities/Stubs/Unity/Debug.cs:13)
    4. Unity.Entities.Runtime.Build.BuildStepExportConfiguration:WriteDebugFile(BuildContext, BuildManifest) (at Library/PackageCache/com.unity.dots.runtime@0.28.0-preview.40/Unity.Entities.Runtime.Build/BuildStepExportConfiguration.cs:55)
    5. Unity.Entities.Runtime.Build.BuildStepExportConfiguration:Run(BuildContext) (at Library/PackageCache/com.unity.dots.runtime@0.28.0-preview.40/Unity.Entities.Runtime.Build/BuildStepExportConfiguration.cs:121)
    6. Unity.Build.BuildStepCollection:Run(BuildContext) (at Library/PackageCache/com.unity.platforms@0.6.0-preview.5/Editor/Unity.Build/BuildStepCollection.cs:77)
    7. Unity.Entities.Runtime.Build.DotsRuntimeBuildPipeline:OnBuild(BuildContext) (at Library/PackageCache/com.unity.dots.runtime@0.28.0-preview.40/Unity.Entities.Runtime.Build/DotsRuntimeBuildPipeline.cs:47)
    8. Unity.Build.BuildProcess:Update() (at Library/PackageCache/com.unity.platforms@0.6.0-preview.5/Editor/Unity.Build/BuildProcess.cs:52)
    9. Unity.Build.BuildPipelineBase:Build(BuildConfiguration, BuildProgress) (at Library/PackageCache/com.unity.platforms@0.6.0-preview.5/Editor/Unity.Build/BuildPipelineBase.cs:64)
    10. Unity.Build.BuildConfiguration:Build() (at Library/PackageCache/com.unity.platforms@0.6.0-preview.5/Editor/Unity.Build/BuildConfiguration.cs:48)
    11. Unity.Build.Editor.<>c:<.cctor>b__41_1(BuildConfiguration) (at Library/PackageCache/com.unity.platforms@0.6.0-preview.5/Editor/Unity.Build.Editor/BuildConfigurationScriptedImporterEditor.cs:67)
    12. Unity.Build.Editor.BuildConfigurationScriptedImporterEditor:ExecuteCurrentBuildAction() (at Library/PackageCache/com.unity.platforms@0.6.0-preview.5/Editor/Unity.Build.Editor/BuildConfigurationScriptedImporterEditor.cs:127)
    13. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    14.  
    So I've added
    "Unity.Physics"
    to my Assambly aaaaaand.....it works. A lttile strange lightning.
    upload_2020-7-29_18-29-59.png
    But it works....Now I try again to let my game run with tiny.
     

    Attached Files:

  15. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    922
    Great that you got it running @roadis
    Let us know how the Tiny build turns out