Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
JPMcWhiskers's avatar
1 year ago
Solved

Unreal Engine github version not compatible with MetaXRPlatform plugin.

Hello, I'm sure I've done something wrong or missed something, but I'm trying to get my entitlement check working and I'm having a heck of a time.   A bit of background: I've downloaded and compil...
  • JPMcWhiskers's avatar
    1 year ago

    Alright well, that's about 72 hours of building, retrying things, and pulling my hair out.  Here's what I've managed to sort out;

    Using the Unreal Engine 5.3.2 from the Epic Games launcher:

    Download the MetaXR plugin from here:  https://developer.oculus.com/downloads/package/unreal-engine-5-integration/
    Download the MetaXRPlatform plugin from here:  https://developer.oculus.com/downloads/package/unreal-5-platform-sdk-plugin
    Both of these should sit in your Unreal Plugins folder under a folder called "Marketplace".  These should work with the latest version of Unreal, but you don't get all of the sweet bells and whistles from the Unreal Meta Fork

    I haven't tested the Entitlement check on the MetaXRPlugin so I can't speak to that.

    Using the Unreal Engine 5.3.2 Meta Fork:

    Downloaded from here https://github.com/Oculus-VR/UnrealEngine

    and installed and compiled painstakingly over (for my computer) 4-6 hours. 

    Once I compiled the version I got from the link above, it was missing the MetaXRPlatform.  I tried to install the MetaXRPlatform plugin like I did by putting it in the plugins/Marketplace folder but that didn't work for me.  

    What did work for me was getting the MetaXRPlatform version from here:  https://github.com/oculus-samples/Unreal-SharedSpaces
    After trying to put that version in the marketplace folder it also didn't work.  So I left the files in the marketplace folder, and then opened visual studio.  I added the Folder structure via "add filters" in the context menu and dragged the files from the folder into the right places.  Then I built the solution again.  Thankfully, VS is smart enough to only try to build things that need to be built. 

    I tried this same process with MetaXRPlatform version 65.0, 64.0, 63.0, and 62.0 to no avail.  It was only the one that I downloaded from the link to 'shared-spaces' that worked for me.  It built successfully and when I started up my Unreal, the MetaXRPlatform was finally functioning in the version of Unreal that Meta modified and that I had to build on my machine.  I'm currently testing the Entitlement check.  I'm not 100% sure I have it working, but it looks like it's doing a check.

  • JPMcWhiskers's avatar
    1 year ago

    Alright, so this will be marked as the answer because I finally got this working.  It's been about a week and a half of me just trying different **bleep**.  I'm going to just jot down here what I changed today to finally roll this over into "working".  A few of these things I believe won't need to be done, I'm too ecstatic to go and test each one, so if someone from Unreal or Meta wanders in here and wants to correct me, I really really hope they do.  

    Okay:

    The long journey

    1. Download the Unreal Engine Meta fork here: https://github.com/Oculus-VR/UnrealEngine
    2. While you're downloading stuff, get this too: https://developer.oculus.com/downloads/package/unreal-5-platform-sdk-plugin
    3. Find a folder in a drive that has like 300gb of extra space on it.  
    4. Before you unzip, right click on the zip folder and go to properties.  At the bottom click "Unblock" in the security section.  If you don't do this it'll take longer and it might not unzip certain files.  Or you can use 7zip.
    5. Upzip.  I'm not going to go over how to setup Visual Studio and Android Studio and download the required SDK and NDK.  It's too much.  It's also a long and somewhat painful process.
    6. You won't be able to open the project until you run Setup.bat and then GenerateProjectFiles.bat.  Some people don't have to run Setup.bat.  I despise them.  Both batch files take a few minutes each.   No GenerateProjectFiles.bat takes like a few seconds.
    7. Open the project.  Wait for it to load.  Pay attention to the notices around the edges of Visual Studio.  It might need you to install some things.  
    8. Hopefully you installed everything you needed to.   Change the drop down at the top of the editor to "Development Editor" and the one to it's right to "Win64"
    9. Change the startup project to UE5.  
    10. In an effort to save you some time, I'm going to tell you here to unzip MetaXRPlatform.zip (that you downloaded above) into the Engine/Plugins/Marketplace directory of the UE5 project you're about to build.  You should unzip the folder into the marketplace directory so the contents of the zip are sitting in UE5.3.2-oculus\Engine\Plugins\Marketplace\MetaXRPlatform
    11. Before you build, go into the MetaXRPlatform directory and find the OculusPlatform.uplugin file.  Edit it.
    12. Remove the content of the "EngineVersion" key.  It should look like this:  "EngineVersion": "",
    13. Either run UE5 by hitting the little green triangle next to "Windows Local Debugger" in visual studio or right click on it and run or build UE5.  It'll do that for...  Several hours.
    14. I hope it built for you.  If it didn't, oh lawrdy, I can't help ya.  
    15. If it did build, UE5.3 should start.  This is the Meta Fork Unreal Engine.  Yay.
    16. Now you should try to run your project in the new UE5.  If it was built in a different version of Unreal it'll build a copy of your project.  Let it do that.
    17. Try to run your new UE5.3.2 project.  It probably won't run.  It'll say it can't run in this version.  
    18. Go into your project folder and right click on your uproject file and if you're running windows 11 you'll have to see all options, but then in the context menu you can click on "Generate Project files".  
    19. Once you do that you should see a visual studio solution file.  Double click on it to open it with Visual Studio.
    20. Right click on your project in the solution explorer on the right and set it to the startup project. 
    21. Up at the top in the furthest left drop down, change to "Development Editor" change the drop down to the right of that to "Win64".  The drop down on the right of that should be your project.  If not you will have to build it.
    22. Either run or build your project.  It'll do that for a few hours and then Unreal Engine should open with your project as the current project.

    The Meta Quest App Manager:

    1. You need to have your company set up
    2. You need to have your app set up
    3. You need to push a build to your Alpha channel (Or whatever channel you're building to)
    4. In Data Use Checkup (Under Requirements) you need to request access to platform features:
    5. User ID
    6. User Profile
    7. User Age Group
    8. These feature requests will demand that you move through the platform feature requests.  
    9. Keep in mind I passed their inspection by re-iterating that I wasn't going to collect or look at any data.  I'm lucky, I don't plan to.   If you plan to, I suggest answering all of those questions to the best of your abilities.

    Unreal Engine Project Settings

    1. Platforms:  Android:  Keystore stuff.  Make sure you build your key and put the data in the Distribution Signing area.
    2. Platforms Android:  Store Version:  Make sure you increment it by one for every build you do.  
    3. Platforms Android: Minimum SDK Version:  32.  Target SDK Version: 32
    4. Platforms Android:  Install Location:  Auto
    5. Platforms Android:  Package game data inside .apk?  [YES]
    6. Platforms Android:  Orientation:  Landscape
    7. Platforms Android: Package for Meta Quest Devices [YES]
    8. Platforms Android: Remove Oculus Signature Files from Distribution APK [YES]
    9. Platforms Android SDK:  SDK API LEVEL:  android-32
    10. Platforms Android NDK API Level:  android-29
    11. Project Packaging:  Project-Build Configuration:  Shipping
    12. Project Packaging:  Project-Build Target:  UnrealGame  (I'm pretty sure this can be whatever)
    13. Project Packaging:  Project-Build For Distribution [YES]

    Add this to the bottom of your DefaultEngine.ini in your [project]\config\ directory:

    [OnlineSubsystem]
    DefaultPlatformService=Oculus
     
    [OnlineSubsystemOculus]
    bEnabled=true
    OculusAppId=[YOUR APP ID HERE]
    RiftAppId=[YOUR APP ID HERE]
    And when I say APP ID I mean the ID that you see in the Meta Quest App Manager under AP where it says "APP ID"
     
    The Entitlement PIN in your Blueprint
    1. Make a custom GameInstance blueprint.  If you're unsure how like I was, go into your project settings and go to Maps & Modes.  Scroll right to the bottom and hit the + next to Game Instance Class.  Put the blueprint somewhere that makes sense in your project.  Or leave it in the root content folder like an Animal, what do I care.
    2. Make a custom Event in the EventGraph of the Game Instance Class that you made.  Name it exactly:  OvrPlatformSubsystemStarted.   Add a boolean input called "OvrPlatformReady"
    3. From this pin, drag out a branch.  If true, then continue on.  If false you can Quit the game or do nothing.
    4. Right click and get the OVRPlatformSubsystem.  Drag out a pin to "Start message pump".  Connect the true pin from the branch that you made previously.
    5. From the message pump drag out a pin to "EntitlementGetIsViewerEntitled"
    6. Then, you can Quit game on failure and do nothing on success.  

     

    I hope this helps someone.  I'm suuuuuuure I've missed a lot of steps, but this got me using the latest MetaXRPlatform plugin on the Oculus Meta Fork.

    I'm not sure how either organization could have made this clearer, but maybe laying absolutely everything out in one guide like I just tried to do would have been helpful.  This has been compiled from 10-20 different posts around the internet from a bunch of different places and a bunch of different time periods.   Oh well.  I hope this helps someone.  Happy coding, friends!