Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Help noob] Can't get this project camera working

Discussion in 'Getting Started' started by KitanoRaziel, Mar 23, 2017.

  1. KitanoRaziel

    KitanoRaziel

    Joined:
    Mar 22, 2017
    Posts:
    7
    I ran into a difficulty with a camera not showing the game level. I am using this free template example. In unity I can run the game and play completely fine. Have been wrestling with this for about two weeks now, no response yet from the maker of the asset. :(

    https://www.assetstore.unity3d.com/en/#!/content/23591

    My process:
    1. I load the file as a new game, with the asset freshly imported.
    2. I change the build settings to iOS, and check that all scenes are present in the build.
    3. I then build it to Xcode project. Then I transfer it to my MacBook, and load it in Xcode.
    4. I can load it to my phone, and open the game.
    5. The menu scene and buttons seem to work. However, when I hit the "new" button, the fade out goes to the virtual game pad with a white background. Can not play or see anything else.


    Again this runs fine in unity.

    Can anyone point out what I am doing wrong or how to fix this? If someone can load the project and see what is wrong, I would be extremely grateful. Really want some reassurance that I am doing things correctly. I am using version 5.5 unity I believe.

    Thank you for any responses!
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    My advice is to forget the asset. Make a simple scene yourself (if you don't know how to do that, back up and do some tutorials — there are a ton of them under the Learn link at the top of this page). Build for iPhone. Make sure that works.

    Then add a menu. Test that. Add a switch to a different scene. Build your project up bit by bit, making sure that it works, and that you understand how it works, at each step.

    You're trying to take a short-cut, dropping in a whole complete project, but the problem is that you don't understand it, so when something goes wrong, you have no way of fixing it. No good will come from that. If you're going to develop games, there really aren't any short-cuts — you have to learn what you're doing.
     
  3. KitanoRaziel

    KitanoRaziel

    Joined:
    Mar 22, 2017
    Posts:
    7
    First of all, thank you for taking the time to respond to my question, I am sure that there are many similar questions.

    Actually, I can follow tutorial and have managed to load a few simple games made by myself with not too much trouble. I then started doing the same with asset pack projects to learn how to fix problems as I find them. Kind of learning techniques as I encounter them.

    I can't just do tutorials or I get bored easily, a more hands on approach if you will.

    I would like to understand why it shows the controller only. I tried to rebuild the scene, but it seemed to get stuck at the same place. Therefore I am looking for a solution to see what it is I missed. If I link to a scene without a vr controller for example, I am able to move to a world map scene that I created with a different character and my own movement. Still can't get the vr pad on iOS though.

    Any hint as to how you would go about it would be appreciated, I have the intention to understand, just need guidance to the right place.

    Again thank you for taking the time to give an answer though.
     
  4. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Hi, there!

    The reason Joe recommended going through the official tutorials is because they do a great job at teaching you how the Unity Editor and API work, as well as the theory behind it all. They're also very hands-on, and should keep you quite engaged.

    To be perfectly frank, it's difficult for us to justify taking the time to debug and explain what's going wrong with your specific case if you're not willing to put in the effort to learn the basics yourself. Especially when doing so would, more often than not, make the problem clear to you so you could solve it yourself. I get that you want to go right to the stuff that excites you, but you'll have much more success if you go through the crawl-walk-run process.

    Good luck!
     
    JoeStrout likes this.
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,951
    Just a heads up. Before you acquire an asset verify that it has received an update recently. Some assets, like the one you're attempting to make use of, have been abandoned by their developers and you won't receive technical support from them.

    Additionally if you check reviews you can sometimes get an idea for what's going wrong. The most recent helpful review mentions that it's semi-broken in Unity 5. It's likely one of the problems they ran into is the exact same one you're having.

    Getting refunds on assets isn't impossible but it's time consuming. Best to try to avoid the problem entirely.

    Unfortunately I don't have access to a build or runtime environment for iOS. Simply glancing over the scripts though shows there is code that only functions during runtime. You can usually find this in the form of a compiler preprocessor statement.

    https://docs.unity3d.com/Manual/PlatformDependentCompilation.html

    For example the first example will allow code to only run within the editor.
    Code (csharp):
    1. #if UNITY_EDITOR
    2. #endif
    This second example won't allow code to run within the editor.
    Code (csharp):
    1. #if !UNITY_EDITOR
    2. #endif
    Third example allows code to run only on Android or iOS.
    Code (csharp):
    1. #if !UNITY_EDITOR && UNITY_ANDROID || UNITY_IOS
    2. #endif
    Additionally the system that automatically updates an asset to a newer release of Unity will not do a perfect job of it. You're far better off as a beginner to download older releases of Unity to use these assets than attempting to convert them to a newer release.
     
    Last edited: Mar 23, 2017
  6. KitanoRaziel

    KitanoRaziel

    Joined:
    Mar 22, 2017
    Posts:
    7

    Thank you also for taking the time to make a reply to this question.

    Like I said, I am also doing tutorials and such. I simply was looking for guidance on this example. It is not like I am not learning how to do other things as well, such as camera scripts and such from various tutorials. If it is really a simple thing I would learn fast, should it not be just as fast to get an idea from the community on what is wrong? It was not fixed when I tried to recreate, so most likely something else was wrong.....so I asked for help.

    Thank you again for taking the time to make an answer.
     
  7. KitanoRaziel

    KitanoRaziel

    Joined:
    Mar 22, 2017
    Posts:
    7
    Thank you very much for this! That is something that I did not realize was possible, to make platform only code. The asset was a free asset, I was just experimenting and practicing using it. So no loss there. I merely wanted to know if I was doing something wrong, or if it was something wrong with the code piece. With your suggestion of automatically updated assets perhaps that was the reason I could not get it to behave as I thought it should.