TheSniperFan / unityserializer-ng

Resurrection of the discontinued Unity Serializer by Mike Talbot from WhyDoIDoIt.com (Unity 5)
MIT License
61 stars 17 forks source link

Usage of obsolete methods #34

Closed applejag closed 8 years ago

applejag commented 8 years ago

I just installed unityserializer-ng on my Unity 5.3.2f1 project, and I got ~30 warning messages about usage of obsolete methods in the code.

image

All the console messages, may not be that useful but here they are:

Assets/Plugins/OpenUnityTools/unityserializer-ng/Radical/RPCEnabler.cs(26,37): warning CS0618: `UnityEngine.NetworkView.RPC(string, UnityEngine.RPCMode, params object[])' is obsolete: `NetworkView RPC functions are deprecated. Refer to the new Multiplayer Networking system.'

Assets/Plugins/OpenUnityTools/unityserializer-ng/Radical/RPCEnabler.cs(34,29): warning CS0618: `UnityEngine.NetworkView.RPC(string, UnityEngine.RPCMode, params object[])' is obsolete: `NetworkView RPC functions are deprecated. Refer to the new Multiplayer Networking system.'

Assets/Plugins/OpenUnityTools/unityserializer-ng/Radical/System/InheritableRPC.cs(22,10): warning CS0618: `UnityEngine.RPC' is obsolete: `NetworkView RPC functions are deprecated. Refer to the new Multiplayer Networking system.'

Assets/Plugins/OpenUnityTools/unityserializer-ng/Radical/System/InheritableRPC.cs(34,99): warning CS0618: `UnityEngine.RPC' is obsolete: `NetworkView RPC functions are deprecated. Refer to the new Multiplayer Networking system.'

Assets/Plugins/OpenUnityTools/unityserializer-ng/Radical/System/InheritableRPC.cs(62,30): warning CS0618: `UnityEngine.NetworkView.RPC(string, UnityEngine.RPCMode, params object[])' is obsolete: `NetworkView RPC functions are deprecated. Refer to the new Multiplayer Networking system.'

Assets/Plugins/OpenUnityTools/unityserializer-ng/Radical/System/InheritableRPC.cs(74,30): warning CS0618: `UnityEngine.NetworkView.RPC(string, UnityEngine.NetworkPlayer, params object[])' is obsolete: `NetworkView RPC functions are deprecated. Refer to the new Multiplayer Networking system.'

Assets/Plugins/OpenUnityTools/unityserializer-ng/Radical/System/Testing/Inherited.cs(10,10): warning CS0618: `UnityEngine.RPC' is obsolete: `NetworkView RPC functions are deprecated. Refer to the new Multiplayer Networking system.'

Assets/Plugins/OpenUnityTools/unityserializer-ng/Serialization/SaveGameManager.cs(106,32): warning CS0618: `UnityEngine.Application.isLoadingLevel' is obsolete: `This property is deprecated, please use LoadLevelAsync to detect if a specific scene is currently loading.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(346,42): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(350,42): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(355,46): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(363,46): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(375,42): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(381,42): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(408,46): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(413,46): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(420,42): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(447,38): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(452,38): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(464,38): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(484,30): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(488,30): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(557,46): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(564,42): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(586,50): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(594,50): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(616,42): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(625,42): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs(645,30): warning CS0618: `UnityEditor.Undo.RegisterSceneUndo(string)' is obsolete: `Use DestroyObjectImmediate, RegisterCreatedObjectUndo or RegisterUndo instead.'

Just wanted to give a heads up, if you're still working on this project that is.

Also found this little fella after I created the Save Game Manager:

null texture passed to GUI.DrawTexture
UnityEngine.GUI:DrawTexture(Rect, Texture)
UnitySerializerWindow:DrawThing(Int32, Rect) (at Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs:65)
UnityEditor.DockArea:OnGUI()
TheSniperFan commented 8 years ago

I've been asked this question a couple of times already. Short version is that I won't fix those warnings anytime soon. The warnings don't actually break the build and are nothing but a nuisance (that you can turn off with a single click). The network (RPC) related warnings were 'fixed' in the unstable branch. By 'fixed' I mean that I ripped all the networking stuff out, because I don't need them for my current project. (Don't use the unstable branch for your games directly. Use a fork, if unstable has something you want.) The undo-redo warnings are a different story. I might fix them for everyone soon™. Whether that happens depends on how difficult it is to remake the features with the new API.

applejag commented 8 years ago

Alright.

Great plugin btw! Really impressed with it! There are some minor things here and there but it's mostly flawless!

Do you know if the physics activate before the scene is fully loaded? It seems to have sent the "OnTriggerEnter" message before the system got around to assigning values somehow. I'll probably investigate what's really happening and launch a seperate issue for it. Is it a known glitch or have I cooked up some weird behaviour brew myself?

TheSniperFan commented 8 years ago

Read the included PDF (manual). For special cases (like yours apparently) there is a IsDeserializing status you can use. I think it was under "Skipping Initialization". You would use it to make sure nothing happens in the Trigger method while the level is being loaded.

TheSniperFan commented 8 years ago

Hey, just a short update on this. I have rewritten the undo code so it a) works and b) doesn't give you a dozen of warnings anymore. Furthermore, I am migrating to another service, so future updates (starting with this one) won't be available here on GitHub. The README.md will be updated with the link to this project's new home.

applejag commented 8 years ago

Sweet job dude. Quick question, as I'm a common github user myself, why move to GitLab? Never heard of it before. Pros n cons? :smiley:

TheSniperFan commented 8 years ago

Sorry for the long post, but I'd like to prevent confusion.

Back when I created my GitHub account, it wasn't because I looked at the alternatives and decided that GitHub was the best option. I simply created it, because it was the only host I knew and didn't even bother to look at the alternatives.

At the time the remote of my game's repository was hosted on my Google Drive. It worked, but was a bit of a PITA. Since only parts of my game are open source (like the serializer), I decided to upgrade my account and move the repository of my game here.

Within the first month, I heard of how a repository was deleted because of its name. ("WebM for retards" - a super simple video converter) If memory serves, there was no notice, no warning. Just one moment it was there, the next it wasn't. I really didn't like the idea of that. It was then, I first heard of another bad GH story and BitBucket, to which I moved my game. Free closed repositories would have been reason enough, to be honest. I didn't like BB as much as GH though. The lack of 2FA was one reason (which they finally addressed) and the UX of the web frontend itself wasn't as good.

During the last weeks GH did more "questionable" moves (to put it nicely) and I decided to do what I should have done before: Get an overview over all the alternatives and compare them. Two hosts were mentioned over and over again: BitBucket and GitLab. BB I knew, GL I looked into.

GitHub:

BitBucket:

GitLab:

GitLab is the most attractive option for an aspiring indie developer, if you ask me. Besides that, I like the web frontend a whole lot more than the BB one (and it has 2FA). Another notable difference is that GitLab is its own software. You can download and host it yourself, if you want to. As you might have noticed, I do not host on GitLab.com. but on such a third party instance. They're crowd-funded and have being politically neutral in their mission statement. That's something I can get behind.

To wrap this up. This is what »I« gain from switching:

All of that in exchange for servers that are a bit slower.

If you have any more questions, ask away.