Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Loading C++ code in UDK

  1. #1

    Question Loading C++ code in UDK


    I'm new to UDK I'm currently evaluating this engine for a project and I'd like to load some simulation code I have in C++.

    Looking at the documentation I found some old document explaining how to load external C++ as DLL and calling it as Native Function.

    Is this possible on UDK or was only available of old version of Unreal Engine with public source code?

    Thanks a lot for your help

  2. #2
    Not possible. That feature is what separates the licensee's from the UDK license.

  3. #3
    There is a hack you can do to partially get around the problem. By setting up a second executable on the local machine that is listening you can send it requests via TCPLink. It then executes your code and returns the results. It's slow, inefficient, and not suited to a lot of tasks but might work for you.

    I myself am very disappointed that we cannot run our own independent or 3rd party code as it makes several game types and non-entertainment applications virtually impossible to write effectively or poses an impractical level of porting from existing, tested, and optimized code into unrealscript.

  4. #4
    It would be nice if we got a pre-built sdk (like havok and physx do) that we could use with c++ and extend via plugins.

  5. #5
    Would have been nice if there where a lib and some header files for making external dll's (even limited, but executed by the game) like if dll exists "mymod.dll", then execute it and have like 4 functions in there like maybe


    And where you have access the basic stuff like materials, network, scripting and such from this lib/header stuff.

    But i guess, even in a limited way, it would be giving away too much

    Or maybe perhaps, if even possible, they could find a way to speed up unreal script execution time, that would be awesome too (or change it to something faster).

  6. #6
    Quote Originally Posted by jeffro11 View Post
    Not possible. That feature is what separates the licensee's from the UDK license.
    I don't know exactly why native functions are not available for the UDK but I hope, ultimately, the main difference between a full licence and a UDK licence is the commitment of tech support you get from Epic. I hope that Epic decides they can expose native methods in the UDK without it costing them a great deal of time or money.

  7. #7
    it would be nice if unreal script had a feature like python's ctypes, where you can access dlls directly from python, and writing wrappers is really fast

  8. #8
    It would be cool if Epic released the header files, so we can compile our own DLL's like we could with UT Classic, which opens native possibilities without having to temper with the real source.

  9. #9
    Ok I understand the situation.

    Sure it would be great if Unreal Script could interface to DLL or Lib. I'm really not expecting to see anything of unreal source code for free. That is fair enough but just giving the power to Unreal Script to load external DLL would really allow great freedom for the creation of different games. As is UDK is more for mod building. Oh well still nice that is free for everyone to play with. I guess I'll just have to look at something else for my current needs.

    Thanks everyone for the help!

  10. #10

    But... What is this description?

    Indicates that "this class uses behind-the-scenes C++ support". Unreal expects native classes to contain a C++ implementation in the .EXE. Only native classes are allowed to declare native functions or implement native interfaces. Native classes must always derive from another native class. Native classes create an auto-generated C++ header file with the necessary glue to interact with the script variables and specified functions. By default, the PackageName is the package that the script class resides in. For example, if the class were in the Engine package, the resulting auto-generated header would be called EngineClasses.h.
    and Here...........
    Advanced function specifiers
    You can declare UnrealScript functions as native, which means that the function is callable from UnrealScript, but is actually implemented (elsewhere) in C++. For example, the Actor class contains a lot of native function definitions, such as:

    native(266) final function bool Move( vector Delta );
    The number inside the parenthesis after the native keyword corresponds to the number of the function as it was declared in C++ (using the AUTOREGISTER_NATIVE macro), and is only required for operator functions. The native function is expected to reside in the DLL named identically to the package of the class containing the UnrealScript definition.

    Where can I find that UDK not include these features???

    ^^; I wannt try to get information more...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts