Coder Social home page Coder Social logo

Update to Unity 5.0? about osvr-unity HOT 6 CLOSED

osvr avatar osvr commented on July 29, 2024
Update to Unity 5.0?

from osvr-unity.

Comments (6)

DuFF14 avatar DuFF14 commented on July 29, 2024

Looks like most of those errors are due to the fact that Unity 5 removed shortcuts to components (.camera, .materials, etc) and now requires a call to GetComponent(). It's supposed to automatically make those code changes in the upgrade process. Refactoring them manually in the existing Unity4 project wouldn't hurt. Not sure about any other problems that might arise from the upgrade process. I'll be digging into Unity5 more thoroughly tomorrow.

On Mar 8, 2015, at 10:24 AM, Sleepy Daddy Software™ [email protected] wrote:

Is it too early to update our unity assets to Unity 5.0? I downloaded Unity 5.0 to get a dev environment setup to test changes and it asked to make a one-way project conversion for 5.0.

Additionally, when attempting to build devscene.unity in unity 5.0, I get the following errors:

Building Solution: OSVR-Unity (Debug)

Building: Assembly-CSharp (Debug)

Performing main compilation...

C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe /noconfig "/r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll"
-nostdlib
"/out:C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Temp\bin\Debug\Assembly-CSharp.dll"
"/r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll"
"/r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll"
"/r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll"
"/r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll"
"/r:C:/Program Files/Unity/Editor/Data/Managed/UnityEngine.dll"
"/r:C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.dll"
"/r:C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll"
"/r:C:/Users/JeremyBell/Desktop/OSVR-Unity/OSVR-Unity/Assets/Plugins/x86/ClientKit.dll"
/nologo
/warn:4
/debug:full
/optimize-
"/define:DEBUG;TRACE;UNITY_5_0_0;UNITY_5_0;UNITY_5;ENABLE_LICENSE_RENAME;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_NONPRO;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN"

/t:library
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\Sample\Demo\Scripts\Managers\ColorManager.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\Sample\Demo\Scripts\Objects\ColorChanger.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\Sample\Scripts\HandleButtonPress.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\Sample\Scripts\SampleAnalog.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\Sample\Scripts\SampleButtonScript.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\ClientKit.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\DLLSearchPathFixer.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\DeviceDescriptor.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\DisplayInterface.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\GetParent.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\InterfaceBase.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\InterfaceCallbacks.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\InterfaceGameObject.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\Math.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\OrientationInterface.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\PoseInterface.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\PositionInterface.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\SimpleJSON.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VREye.cs"
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VRHead.cs"
"/nowarn:0169"
/fullpaths
/utf8output

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\Sample\Demo\Scripts\Objects\ColorChanger.cs(25,24): error CS1061: 'UnityEngine.Component' does not contain a definition for 'materials' and no extension method 'materials' accepting a first argument of type 'UnityEngine.Component' could be found (are you missing a using directive or an assembly reference?)

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VREye.cs(49,24): error CS1061: 'UnityEngine.Component' does not contain a definition for 'CopyFrom' and no extension method 'CopyFrom' accepting a first argument of type 'UnityEngine.Component' could be found (are you missing a using directive or an assembly reference?)

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VREye.cs(62,21): error CS0619: 'UnityEngine.Component.camera' is obsolete: 'Property camera has been deprecated. Use GetComponent() instead. (UnityUpgradable)'

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VREye.cs(74,32): error CS1061: 'UnityEngine.Component' does not contain a definition for 'rect' and no extension method 'rect' accepting a first argument of type 'UnityEngine.Component' could be found (are you missing a using directive or an assembly reference?)

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VREye.cs(77,32): error CS1061: 'UnityEngine.Component' does not contain a definition for 'rect' and no extension method 'rect' accepting a first argument of type 'UnityEngine.Component' could be found (are you missing a using directive or an assembly reference?)

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VRHead.cs(73,36): error CS1061: 'UnityEngine.Component' does not contain a definition for 'enabled' and no extension method 'enabled' accepting a first argument of type 'UnityEngine.Component' could be found (are you missing a using directive or an assembly reference?)

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VRHead.cs(74,45): error CS1061: 'UnityEngine.Component' does not contain a definition for 'enabled' and no extension method 'enabled' accepting a first argument of type 'UnityEngine.Component' could be found (are you missing a using directive or an assembly reference?)

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VRHead.cs(75,46): error CS1061: 'UnityEngine.Component' does not contain a definition for 'enabled' and no extension method 'enabled' accepting a first argument of type 'UnityEngine.Component' could be found (are you missing a using directive or an assembly reference?)

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VRHead.cs(79,36): error CS1061: 'UnityEngine.Component' does not contain a definition for 'enabled' and no extension method 'enabled' accepting a first argument of type 'UnityEngine.Component' could be found (are you missing a using directive or an assembly reference?)

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VRHead.cs(80,45): error CS1061: 'UnityEngine.Component' does not contain a definition for 'enabled' and no extension method 'enabled' accepting a first argument of type 'UnityEngine.Component' could be found (are you missing a using directive or an assembly reference?)

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VRHead.cs(81,46): error CS1061: 'UnityEngine.Component' does not contain a definition for 'enabled' and no extension method 'enabled' accepting a first argument of type 'UnityEngine.Component' could be found (are you missing a using directive or an assembly reference?)

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VRHead.cs(105,21): error CS1502: The best overloaded method match for 'OSVR.Unity.VREye.MatchCamera(UnityEngine.Camera)' has some invalid arguments

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VRHead.cs(105,44): error CS1503: Argument '1': cannot convert from 'UnityEngine.Component' to 'UnityEngine.Camera'

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VRHead.cs(105,44): error CS0619: 'UnityEngine.Component.camera' is obsolete: 'Property camera has been deprecated. Use GetComponent() instead. (UnityUpgradable)'

c:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\OSVRUnity\src\VRHead.cs(145,24): error CS1061: 'UnityEngine.Component' does not contain a definition for 'fieldOfView' and no extension method 'fieldOfView' accepting a first argument of type 'UnityEngine.Component' could be found (are you missing a using directive or an assembly reference?)

Build complete -- 15 errors, 0 warnings

Building: Assembly-CSharp-Editor (Debug)

Performing main compilation...

C:\Windows\Microsoft.NET\Framework\v3.5\csc.exe /noconfig "/r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll"
-nostdlib
"/out:C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Temp\bin\Debug\Assembly-CSharp-Editor.dll"
"/r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll"
"/r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll"
"/r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll"
"/r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll"
"/r:C:/Program Files/Unity/Editor/Data/Managed/UnityEngine.dll"
"/r:C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.dll"
"/r:C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll"
"/r:C:/Users/JeremyBell/Desktop/OSVR-Unity/OSVR-Unity/Assets/Plugins/x86/ClientKit.dll"
"/r:C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.Graphs.dll"
"/r:C:/Program Files/Unity/Editor/Data/PlaybackEngines/androidplayer/UnityEditor.Android.Extensions.dll"
"/r:C:/Program Files/Unity/Editor/Data/PlaybackEngines/iossupport/UnityEditor.iOS.Extensions.dll"
"/r:C:/Program Files/Unity/Editor/Data/PlaybackEngines/wp8support/UnityEditor.WP8.Extensions.dll"
"/r:C:/Program Files/Unity/Editor/Data/PlaybackEngines/metrosupport/UnityEditor.Metro.Extensions.dll"
"/r:C:/Program Files/Unity/Editor/Data/PlaybackEngines/blackberryplayer/UnityEditor.BB10.Extensions.dll"
"/r:C:/Program Files/Unity/Editor/Data/PlaybackEngines/webglsupport/UnityEditor.WebGL.Extensions.dll"
"/r:C:/Program Files/Unity/Editor/Data/PlaybackEngines/linuxstandalonesupport/UnityEditor.LinuxStandalone.Extensions.dll"
"/r:C:/Program Files/Unity/Editor/Data/PlaybackEngines/windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll"
"/r:C:/Program Files/Unity/Editor/Data/PlaybackEngines/macstandalonesupport/UnityEditor.OSXStandalone.Extensions.dll"
/nologo
/warn:4
/debug:full
/optimize-
"/define:DEBUG;TRACE;UNITY_5_0_0;UNITY_5_0;UNITY_5;ENABLE_LICENSE_RENAME;ENABLE_NEW_BUGREPORTER;ENABLE_2D_PHYSICS;ENABLE_4_6_FEATURES;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_NEW_HIERARCHY;ENABLE_PHYSICS;ENABLE_PHYSICS_PHYSX3;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_AUDIOMIXER_SUSPEND;ENABLE_NONPRO;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN"

/t:library
"C:\Users\JeremyBell\Desktop\OSVR-Unity\OSVR-Unity\Assets\Editor\OSVRUnityBuild.cs"
"/nowarn:0169"
/fullpaths
/utf8output

Build complete -- 0 errors, 0 warnings

---------------------- Done ----------------------

Build: 15 errors, 0 warnings


Reply to this email directly or view it on GitHub.

from osvr-unity.

rpavlik avatar rpavlik commented on July 29, 2024

@DuFF14, I assume this is finished now? Do we need to be setting up a separate package build for Unity 5?

from osvr-unity.

DuFF14 avatar DuFF14 commented on July 29, 2024

This is done. No, I don't think we need a separate build.

from osvr-unity.

rpavlik avatar rpavlik commented on July 29, 2024

Does it help check for build issues, though? (That is, if we do a build but just don't upload it)

from osvr-unity.

DuFF14 avatar DuFF14 commented on July 29, 2024

The only issue I see currently is if new code is written in Unity 4 that doesn't use GetComponent to access components, and nobody notices. I don't think this error would be caught in an automated package build, but the Unity 5 editor is supposed to catch and fix this issue automatically at any time, not just during package import. If I change "GetComponent." to "camera.", Unity 5 offers to fix it as soon as the file is saved (this is not necessarily the best semantic fix, but it fixes the syntax). If I intentionally leave this error in, then try to export a package from Unity 5, it allows me to do that.

I'm not sure how different the automated package build process will be for Unity 5 (if at all), but it definitely wouldn't hurt to start setting things up for Unity 5. There is a good chance that differences between Unity 4 and 5 become greater as Unity adds VR specific features and optimizations in future releases (for example, if the camera component changes). I'd expect that most VR developers and OSVR contributors will be using Unity 5 very soon if they aren't already.

from osvr-unity.

rpavlik avatar rpavlik commented on July 29, 2024

Well, doesn't it compile the sources in a package build? It opens the project, and I'm pretty sure it compiles the source when it does so, so it would catch that.

This is blocked on getting Unity 5 installed on the CI machines.

from osvr-unity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.