Skip to content

Commit

Permalink
deferred instancing rpc client
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-yao91 committed Jul 19, 2024
1 parent 820058b commit 548ffea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/addons/send2ue/dependencies/unreal.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
default_imports=['import unreal'],
remap_pairs=REMAP_PAIRS,
)

rpc_client = rpc.client.RPCClient(port=UNREAL_PORT)
unreal_response = ''


Expand Down Expand Up @@ -170,6 +168,7 @@ def is_connected():
Checks the rpc server connection
"""
try:
rpc_client = rpc.client.RPCClient(port=UNREAL_PORT)
return rpc_client.proxy.is_running()
except (RemoteDisconnected, ConnectionRefusedError, ProtocolError):
return False
Expand All @@ -179,6 +178,7 @@ def set_rpc_env(key, value):
"""
Sets an env value on the unreal RPC server.
"""
rpc_client = rpc.client.RPCClient(port=UNREAL_PORT)
rpc_client.proxy.set_env(key, value)


Expand Down

0 comments on commit 548ffea

Please sign in to comment.