ouya / ouya-unity-plugin-old Goto Github PK
View Code? Open in Web Editor NEWUnity plugin for OUYA
Home Page: http://devs.ouya.tv
License: Apache License 2.0
Unity plugin for OUYA
Home Page: http://devs.ouya.tv
License: Apache License 2.0
Unity 4.3 is now live, and with it the controller mappings are broken.
NGUI's Readme says that you should clearly state that NGUI is being used. However, it isn't stated anywhere.
I just pulled down the complete package and I am getting errors in unity dealing with OuyaSDK not containing IFetchGamerUUIDListener or any of the methods in references to those items. Since that appears to be the last commit I am assuming that the OuyaSDK.cs was not commited with the changes.
Exact Error:
Assets/Ouya/Examples/Scripts/OuyaShowProducts.cs(22,13): error CS0426: The nested type IFetchGamerUUIDListener' does not exist in the type
OuyaSDK'
All this running in the editor, without trying to debug, just hitting play hangs Unity 4.5 and I have to manually kill Unity.
I'll use Unity 4.3 for the OUYA release, but you guys might wanna give it a look.
Unity 4.3.4
Imported the core package into my project and got this
Assets/Ouya/SDK/Scripts/OuyaGameObject.cs(20,7): error CS0246: The type or namespace name `OuyaSDK_LitJson' could not be found. Are you missing a using directive or an assembly reference?
In unity 4.5 the new path for the classes.jar
of the AndroidPlayer is:
/Contents/PlaybackEngines/AndroidPlayer/release/bin/classes.jar
And OuyaPanel is looking for it in:
Contents/PlaybackEngines/AndroidPlayer/bin/classes.jar
I've noticed recently that I wasn't able to build my projects on OSX anymore. I have made a fresh clone and export just to be sure. However I am still able to build with an older version that I have here.
I have tested on both Windows 7 aswell as OSX 10.9.2 both using Unity 4.3.4. On windows I can still build and run, however I run into this error on OSX.
Build Failure
Unable to convert classes to dex format. See the console for details.
From the plugin repo itself
symbol : constructor Product(java.lang.String,java.lang.String,int,int,java.lang.String,int,int,java.lang.String)
location: class tv.ouya.console.api.Product
Product product = new Product(sku, "", 0, 0, "", 0, 0, "");
^
1 error
UnityEngine.Debug:LogError(Object)
OuyaMenuAdmin:CompileApplicationClasses() (at Assets/Ouya/SDK/Editor/OuyaMenuAdmin.cs:244)
OuyaMenuAdmin:MenuGeneratePluginJar() (at Assets/Ouya/SDK/Editor/OuyaMenuAdmin.cs:101)
OuyaPostProcessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Ouya/SDK/Editor/OuyaPostProcessor.cs:78)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])
ArgumentException: An empty file name is not valid.
System.IO.FileSystemInfo.CheckPath (System.String path) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.IO/FileSystemInfo.cs:255)
System.IO.DirectoryInfo..ctor (System.String path, Boolean simpleOriginalPath) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.IO/DirectoryInfo.cs:59)
System.IO.DirectoryInfo..ctor (System.String path)
(wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:.ctor (string)
OuyaPanel.GenerateRJava () (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:1066)
OuyaPanel.CompileApplicationJava () (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:1348)
OuyaPostProcessor.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPath) (at Assets/Ouya/SDK/Editor/OuyaPostProcessor.cs:81)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/AssetPostprocessor.cs:26)
When I import the core SDK into a new project
Failed to find Android jar: C:/Users/Joel/Desktop/adt-bundle-windows-x86_64-20140321/sdk/platforms/android-9/android.jar
UnityEngine.Debug:LogError(Object)
OuyaMenuAdmin:CompileApplicationClasses() (at Assets/Ouya/SDK/Editor/OuyaMenuAdmin.cs:189)
OuyaMenuAdmin:MenuGeneratePluginJar() (at Assets/Ouya/SDK/Editor/OuyaMenuAdmin.cs:101)
OuyaPostProcessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Ouya/SDK/Editor/OuyaPostProcessor.cs:78)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])
ArgumentException: An empty file name is not valid.
System.IO.FileSystemInfo.CheckPath (System.String path) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.IO/FileSystemInfo.cs:255)
System.IO.DirectoryInfo..ctor (System.String path, Boolean simpleOriginalPath) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.IO/DirectoryInfo.cs:59)
System.IO.DirectoryInfo..ctor (System.String path)
(wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:.ctor (string)
OuyaPanel.GenerateRJava () (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:1066)
OuyaPanel.CompileApplicationJava () (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:1348)
OuyaPostProcessor.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPath) (at Assets/Ouya/SDK/Editor/OuyaPostProcessor.cs:81)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/AssetPostprocessor.cs:26)
And this error happens after I compile the plugin
C:\Users\Joel\Documents\puyaTest\Assets\Plugins\Android\src\OuyaUnityPlugin.java:417: cannot find symbol
symbol : constructor Product(java.lang.String,java.lang.String,int,int,java.lang.String,int,int,java.lang.String)
location: class tv.ouya.console.api.Product
Product product = new Product(sku, "", 0, 0, "", 0, 0, "");
^
1 error
UnityEngine.Debug:LogError(Object)
OuyaMenuAdmin:CompileApplicationClasses() (at Assets/Ouya/SDK/Editor/OuyaMenuAdmin.cs:244)
OuyaMenuAdmin:MenuGeneratePluginJar() (at Assets/Ouya/SDK/Editor/OuyaMenuAdmin.cs:101)
OuyaPostProcessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Ouya/SDK/Editor/OuyaPostProcessor.cs:78)
UnityEditor.AssetDatabase:Refresh()
OuyaPanel:Update() (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:915)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
Assets/Ouya/SDK/Scripts/OuyaGameObject.cs(20,7): error CS0246: The type or namespace name `LitJson' could not be found. Are you missing a using directive or an assembly reference?
I'm receiving this message when trying to build using both the Core and StartKit Unity Packages.
I have the latest version of the OuyaSDK from git with the updated code:
From Assets/Litjson to Assets/Ouya/Litjson.
Line 314 in current master: https://github.com/ouya/ouya-unity-plugin/blob/master/Assets/Plugins/Android/src/OuyaUnityPlugin.java#L314
Log message "OuyaUnityPlugin.getReceiptsAsync" should be "OuyaUnityPlugin.getProductsAsync"
Similar issue on lines 411 and 448.
Trivial, but something that could cause confusion.
I noticed an issue today while trying to get the plugin working. It seems that if you have an older version of AAPT on your system, then that one may be used when building the Java portion of the code. The Unity console indicates the error as "R.Java cannot be found".
Here's the log of the call to AAPT:
[Running Process] filename=C:\Program Files (x86)\Android\android-sdk\platforms\android-4\tools\aapt.exe arguments=package -v -f -m -J gen -M "C:\Users\chris\Documents\New Unity Project 10/Assets/Plugins/Android/AndroidManifest.xml" -S "C:\Users\chris\Documents\New Unity Project 10/Assets/Plugins/Android/res" -I "C:/Program Files (x86)/Android/android-sdk/platforms/android-16/android.jar" -F "C:\Users\chris\Documents\New Unity Project 10/Assets/Plugins/Android/bin/resources.ap_" -J "C:\Users\chris\Documents\New Unity Project 10/Assets/Plugins/Android/src"
UnityEngine.Debug:Log(Object)
OuyaPanel:RunProcess(String, String, String, String&, String&) (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:2917)
OuyaPanel:RunProcess(String, String) (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:2893)
OuyaPanel:GenerateRJava() (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:1099)
OuyaPanel:CompileApplicationJava() (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:1348)
OuyaPanel:Update() (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:940)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
Notice, it's selecting AAPT from the android-4 tools even thought it's configured to use android-16. That generates the following warning:
[Results] elapsedTime: 0.0490028 errors: invalid resource directory name: C:\Users\chris\Documents\New Unity Project 10\Assets\Plugins\Android\res/drawable-xhdpi
output:
UnityEngine.Debug:Log(Object)
OuyaPanel:RunProcess(String, String, String, String&, String&) (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:2926)
OuyaPanel:RunProcess(String, String) (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:2893)
OuyaPanel:GenerateRJava() (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:1099)
OuyaPanel:CompileApplicationJava() (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:1348)
OuyaPanel:Update() (at Assets/Ouya/SDK/Editor/OuyaPanel.cs:940)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
I was able to temporarily work-around by manually setting pathAAPT in OuyaPanel.cs. The correct version was located (for me) in android-sdk\build-tools\18.1.1.
Let me know if you need anymore info.
Thanks,
Chris
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.