The forum is active for archival purposes only.

Join our discord community for new topics.

Forum Navigation
Forum breadcrumbs - You are here:ForumPrism: GeneralCunstom Unreal plugin install
You need to log in to create posts and topics.

Cunstom Unreal plugin install

Hi,

I'm trying to install Prism plugin in a custom Unreal version, based on 5.2.
Unlike the Vanilla version, I can't get the Prism menu to show up.

We've compile the plugin with our engine and put it in our engine structure.
I can see the plugin listed and activated in the Plugin Settings.

But even if I set a Project and point Unreal to myProject.uproject, it won't show.

I get an error related to a PRISM_ROOT environment variable, which is weird because I have no such variable and only my custom engine complains about it.

Any ideas?

Hello @broy,

Do you mean you can see the Prism Unreal Plugin inside of the Unreal plugin list?
If yes you can try if this module is available in the Unreal Python Console: unreal.PrismPythonAPI

The PRISM_ROOT env var isn't needed and it definitely shouldn't cause an error when it's not set. What's the error you get?

If you mean PRISMROOT instead, this should be replaced automatically with a filepath when Prism adds the Prism plugin to your Unreal project. If you copied the plugin manually, then you might need to replace PRISMROOT with the path to your Prism installation like C:/Program Files/Prism2.

 

Yes, I see the plugin listed in the plugin settings, I just can't get the menu to aprear in the UI.

this is where we've put the compiled plugin:
.....\UnrealEngine\Engine\Plugins\Marketplace\Prism

and in Content\python, the PrismInit.py is what fails.

############################################################

import os
import sys


def prismInit():
    envPrismRoot = os.getenv("PRISM_ROOT")
    if envPrismRoot:
        prismRoot = envPrismRoot
    else:
        prismRoot = PRISMROOT
        # prismRoot = os.path.normpath(r"C:\Program Files\Prism2")

    scriptDir = os.path.join(prismRoot, "Scripts")
    if scriptDir not in sys.path:
        sys.path.append(scriptDir)
    
    try:
        import PrismCore
    except Exception as e:
        print("WARNING - failed to import PrismCore: %s" % e)
    else:
        pcore = PrismCore.create(app="Unreal", prismArgs=["splash", "noProjectBrowser"])
        return pcore

#####################################

First it looks for the PRISM_ROOT env var which is not set, then tries to initialize prismRoot from PRISMROOT which is not set anywhere, so this fails.

As you can see there is a line I commented here where I hardcoded the prismRoot path, let me go over this part, but it fails on QT stuff from importing PrismCore.

LogPluginManager: Log: Mounting Engine plugin Prism
LogPackageName: Display: FPackageName: Mount point added: '../../Plugins/Marketplace/Prism/Content/' mounted to '/Prism/'
LogPython: Log: WARNING - failed to import PrismCore: No Qt bindings could be found

typing unreal.PrismPythonAPI in the py console does not return any errors.

How does the vanilla Unreal knows to load the plugin from C:/ProgramData/Prism2/plugins/.... ?

Usually you would go to the Prism Project Settings in Prism standalone and add your UE project there. Prism then copies the Prism plugin to your project and replaces PRISMROOT with your Prism install path (C:\Program Files\Prism2 by default). In your case you're replacing the variable manually, which is also fine.

How does the vanilla Unreal knows to load the plugin from C:/ProgramData/Prism2/plugins/.... ?

Prism gets loaded from C:\Program Files\Prism2 and checks your configured pluginpaths at %userprofile%\Documents\Prism2\PluginPaths.json and there it finds the path to C:/ProgramData/Prism2/plugins/Unreal.

 

This one seems to be the important line:

LogPython: Log: WARNING - failed to import PrismCore: No Qt bindings could be found

Normally Unreal should be able to load PySide2 from here: C:\Program Files\Prism2\PythonLibs\Python3\PySide\PySide2.

You can try this in the UE Python shell:

import sys
sys.path.append(r"C:\Program Files\Prism2\PythonLibs\Python3\PySide")
from PySide2.QtCore import *

I guess this will work in your Vanilla UE and create an error in your custom build. Did you modify the Python version in your custom UE build?