MobileUO
MobileUO copied to clipboard
Upgrade MobileUO to CUO version 0.1.9.0
#24
This PR is bringing CUO up to version 0.1.9.0. This build seems stable in both Unity Player and my Android phone from my testing. Again, there could be issues that I haven't noticed.
Changes since 0.1.8.0 PR:
- Still flagging all changes from CUO with
// MobileUO:comments - Updated shader file. Please double check it, but I believe I migrated it correctly from the
.fxfile changes. I had to add aBrightlightvariable to be passed in. - There's a few rendering/graphics places that were trying to use
SDL_CreateRGBSurfaceWithFormatFromwhich doesn't exist in our version of XNA, so I reverted them to the previously working logic. Similarly withGetDatafrom XNA'sTexture2Dclass. - There's new
PixelCheckmethods that uses a newPixelPickerclass. I reverted to using the oldTexture.Contains()/GetDataAtPos()logic for Pixel Checks until this logic can be merged intoPixelPicker. I left a TODO marker for it. - I backported one 0.1.10.0 fix for bringing gumps to the top to fix an issue with the radar mini map and world map gumps
- MP3Sharp was removed from the project and added as an external git submodule. I put it in
Assets/Scripts/MP3Sharpso that Unity will pick it up and not have to symlink the files. Sound.csnow is throwing an exception when I try to set the volume to 0. It wasn't doing it previously. I just commented out with a TODO stub for now. Error isUnityException: set_volume can only be called from the main thread.. It wasn't doing this on the last version, so not sure what changed here unless it was because of the MP3Sharp changes.- I stubbed out with a TODO marker the
UOFileManagerchanges for iOS filesystem. I currently don't have a Mac to compile and test on my iPhone; I'll re-visit it later in latest CUO version if needed. - Kept old
Packetclasses only for Assistant. I left TODO markers that the Assistant should be re-written to remove the dependency on these old versions. - I added the NugetForUnity package so that we could add the
System.Runtime.CompilerServices.UnsafeNuget package that CUO added
Those should be the high level notable changes. Everything else was just core CUO changes.
I'm trying to check out your PR on my Windows machine but running into problems with symlinks and MP3Sharp submodule. Are you also working on the changes on Windows? Or some other OS? I think I can fix the symlinks on my end but somehow the MP3Sharp submodule shows this error when trying to open or update it: error: pathspec 'Assets/Scripts/MP3Sharp' did not match any file(s) known to git
Any ideas?
@VoxelBoy
I'm pushing one commit that I think will fix the MP3Sharp repo. Here's all the instructions for getting set up:
- Re-installed latest Git for Windows and made sure to enable symbolic links
- Add permission to your user to be able to create symlinks via GPO: https://stackoverflow.com/questions/5917249/git-symbolic-links-in-windows/59761201#comment130689929_59761201
- I made sure symlinks were enable for the git repo git config core.symlinks true
- I ran Visual Studio as an admin (appears to be required to make the symlinks work). I switched to a test branch and back to master and they were there and working. Should also work with git bash, just make sure you run as admin
Pulling the branch:
- Open VS, run as admin
- Clone a repository: https://github.com/mandlar/MobileUO.git
- switch to branch: tags/0.1.9.0
- git submodule init
- git submodule update
- if for some reason MP3Sharp still doesn't show up, add it yourself: git submodule add https://github.com/andreakarasho/MP3Sharp.git Assets/Scripts/MP3Sharp
- Add the project into Unity Hub
- Open the project in Unity
- Unity will now create a .sln file so that you can also open the project inside of Visual Studio (if you so choose. I've been using VS 99% of the time with this project)
- TEMP FIX: delete MP3Sharp.UnitTests and XNA4Sample folders inside of the Assets/Scripts/MP3Sharp/ folder. I'll either symlink everything or fork the MP3Sharp repo and remove these from it or do something else to fix this. I apparently forgot I did this previously. I was originally trying to avoid having to symlink the files from this repo, but it looks like I might just have to unless there's a way to ignore a subdirectory with a submodule.
@VoxelBoy just FYI, I merged a PR into this branch
I came up with implementations for the missing SetDataPointerEXT() and GetData() functions in Texture2D so I could use the original CUO code instead of hacking together the older implementations that I was still using.
@VoxelBoy made one more PR into this to fix the issues with MP3Sharp
I had issues doing a directory symlink; Unity was stuck in an infinite import loop. So I moved the submodule to /external/ directory and just manually copied the MP3Sharp directory into Assets/Scripts/. Maybe later I'll symlink each individual file since that method does work for CUO