Search Unity

Problems getting started

Discussion in 'Unity Everyplay' started by Nadan, Sep 21, 2014.

  1. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Hi!

    I have some problems on getting started with everyplay. I'm making games for Android and iOS, but I'm starting to learn Everyplay with the Android version. So I have read the documents from everyplay.com and watched the Unite 2014 - Why and how You Should Use Everyplay on Youtube.

    I downloaded the Everyplay SDK from Asset Store, imported it to my game and set up the client ID, client secret and redirect URI. Then I checed the Android Enabled -button.

    Then I made two scenes one that starts to record the video and takes to the game. I quess the recording don't have to start and end in one scene only. So here I made a gameobject and put a sript to start recording.

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class autostartrecording : MonoBehaviour {
    5.  
    6.    public string loadGame;
    7.    private bool donerecording = true;
    8.  
    9.    // Use this for initialization
    10.    void Start () {
    11.      Everyplay.StartRecording();
    12.      Application.LoadLevel(loadGame);
    13.    }
    14.  
    15. }
    And the other that ends recording the video, here I plan to put replay, share choices for the player.

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class stoprecording : MonoBehaviour {
    5.  
    6.    // Use this for initialization
    7.    void Start () {
    8.      Everyplay.StopRecording();
    9.    }
    10.  
    11. }
    When I play this on the player I get no errors, but when I try to build this I get lots..

    Code (csharp):
    1. Assets/Scripts/everplay/autostartrecording.cs(7,22): warning CS0414: The private field `autostartrecording.donerecording' is assigned but its value is never used
    2.  
    3. [AndroidManifest-main.xml:1, AndroidManifest.xml:2] /manifest/supports-screens defined in library, missing from main manifest:
    4. UnityEditor.HostView:OnGUI()
    5.  
    6. Unable to find unity activity in manifest. You need to make sure orientation attribute is set to sensorLandscape manually.
    7. UnityEditor.HostView:OnGUI()
    8.  
    9. No activity found in the manifest with action MAIN and category LAUNCHER.
    10. Your application may not start correctly.
    11. UnityEditor.HostView:OnGUI()
    12.  
    13. Error building Player: Win32Exception: ApplicationName='C:\Program Files (x86)\Java\jre7\bin\javac.exe', CommandLine='-bootclasspath "C:/Android/adt-bundle-windows-x86_64-20131030/sdk/platforms/android-19\android.jar" -d ....
    The docs give me a list of functions, but I 'm not sure what function shoud I put and where to get started.

    Any help?
     
  2. trinta

    trinta

    Unity Technologies

    Joined:
    Jun 5, 2013
    Posts:
    24
    Hi Nadan,

    The error message points to Unity trying to compile your application using the JRE (Java Runtime Library) when you actually need the JDK (Java Development Kit).

    If you don't have the latest JDK, install it and restart Unity.

    If you already have it, you need to make sure that your JAVA_HOME environment variable points to the JDK base directory. You can check out the istructions here: http://kaanmutlu.wordpress.com/2013/04/26/setting-the-java_home-in-windows-7-64-bit/

    Best regards,
    Tuomas
     
  3. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Now I've installed the latest JDK and I can build the game in Unity that I coudn't do before.

    I tried to install the APK to my device, but instead of having my own game icon, there is this green icon that only says "APK" and after installing it I can't find the game anywhere on my device. There are still error written in yellow in Unity so I quess these need to be resolved.

    Code (csharp):
    1. Assets/Scripts/everplay/autostartrecording.cs(7,22): warning CS0414: The private field `autostartrecording.donerecording' is assigned but its value is never used
    I don't know what this 'autostartrecording.donerecording' variable does. I just copied the code from "Unite 2014 - Why and how You Should Use Everyplay on Youtube".

    Code (csharp):
    1.  [AndroidManifest-main.xml:1, AndroidManifest.xml:2] /manifest/supports-screens defined in library, missing from main manifest:
    2. UnityEditor.HostView:OnGUI()
    3.  
    4. Unable to find unity activity in manifest. You need to make sure orientation attribute is set to sensorLandscape manually.
    5. UnityEditor.HostView:OnGUI()
    6.  
    7. No activity found in the manifest with action MAIN and category LAUNCHER.
    8. Your application may not start correctly.
    9. UnityEditor.HostView:OnGUI()
    Do I need to add some script when the game starts? The docs tell something about "Everyplay.ReadyForRecording".

    Thank you for the help so far! As a game designer I'm not so good with this code-side, mainly using Unity's Javascript in my games so that is probably one reason I'm little lost with this.
     
  4. trinta

    trinta

    Unity Technologies

    Joined:
    Jun 5, 2013
    Posts:
    24
    Can you copy-paste the contents of your AndroidManifest.xml that is generated when you build for Android?