Skip to content

Configure IntelliJ IDEA

hiperbou edited this page Apr 30, 2023 · 7 revisions

Open and compile the Gradle kotlin-examples project

Open IntelliJ IDEA and open the project located at kotlin-unreal\kotlin-examples. The folder should contain the file build.gradle.kts wich is the Gradle project.

Executing the gradle task "build" will build the code and make it available to our Unreal project.

imagen

Next: Hello World Tutorial

The following instructions are only for the old IntelliJ IDEA project versions prior 2023-04-30 and it's only required if you're using an old branch.

Adding the copyjs external tool to InteliJ IDEA (Deprecated)

The following instructions are only for the old IntelliJ IDEA project versions prior 2023-04-30 and it's only required if you're using an old branch.

First we need to add an external tool to run a batch file that will copy the compiled code to our Content folder.

Go to (or a similar directory depending on your IDEA version):

C:\Users\[YOUR_USER]\AppData\Roaming\JetBrains\IdeaIC2020.3\

Open the file tools\External Tools.xml or create the "tools" directory and the file in case it doesn't exists.

We will add a tool named "copyjs" that will the call the batch "copyjs.bat", so modify the "External Tools.xml" file to something like this.

<toolSet name="External Tools">
  <tool name="copyjs" showInMainMenu="false" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
    <exec>
      <option name="COMMAND" value="$ProjectFileDir$\copyjs.bat" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
    </exec>
  </tool>
</toolSet>

Alternatively, you can add the external tool using the IDE with the following instructions

Here you can see the configuration needed.

Open and compile the kotlin-examples project (Deprecated)

The following instructions are only for the old IntelliJ IDEA project versions prior 2023-04-30 and it's only required if you're using an old branch.

Open IntelliJ IDEA and open the project located at kotlin-unreal\kotlin-examples. The folder should contain the file kotlin-examples.iml wich is the IntelliJ IDEA project.

There will be a Build configuration selected by default. And pressing the green "Play" button, will compile the code and execute the "copyjs.bat" making the compiled code available to our Unreal project.

Next: Hello World Tutorial