I’ve been getting reportMissingImports messages for all imports except datetime, and I don’t know how to fix that. My reference for creating these Python functions comes from Python in Unreal Engine — The undocumented parts but I’m trying to export a bunch of vectors onto an interactive graph.
import unreal as ue
import plotly
import plotly.graph_objs as go
from datetime import datetime
@ue.uclass()
class ProceduralGenerationDebug(ue.BlueprintFunctionLibrary):
@ue.ufunction(static = True, params=ue.Array(ue.Vector()))
def random_point_gen_unit_sphere(unit_sphere_points):
fig = go.Figure(data=[go.Scatter3d(unit_sphere_points)])
ax = go.Layout(xaxis=dict(title="X"), yaxis=dict( title="Y"), zaxis=dict(title="Z"), title="Random Generation on Unit sphere")
plotly.offline.plot({"data": [fig], "layout":ax}, auto_open=True, filename("./random_uniform_points_" + datetime.now().strftime("%d/%m/%Y %H:%M:%S") + ".html"))
return
The file’s inside of the project files \Content\Python
. I did not build UE5 from source but I did download plotly inside of where Python would be.
I tried watching Python in Unreal Engine | Inside Unreal and in the Python Paths section, the speaker said that restarting the engine is required, I did that, and it still doesn’t work.
Thanks in advance to anyone who answers.