Search Feedback

345
votes

Possibility to use kotlin native language with unity 3d

General

-

-

Possibility to use kotlin native language with unity 3d.

As it is now possible to compile kotlin natively, it can be theorically possible to use unity3d in addition.
It should be great to be able to use kotlin with unity 3d.

Comments (13)

  1. A2939e32c2c806bfcc2ab4fb3bb129a3?d=mm

    lostmekka

    Oct 10, 2018 10:15

    This is the biggest factor that keeps me from using Unity for all my game projects. C# is fine, but once you touched Kotlin, you do not want to write bigger projects in any other language anymore.

    Some time ago, I also thought about writing custom bindings for KotlinJS, so that I could compile Kotlin to Javascript and use this in unity. But since there is the plan to remove Javascript support from Unity, this is not worthwhile either...

  2. D380d58d31c8f75e48195260777c675e?d=mm

    rmembrives

    Sep 17, 2018 11:18

    My 10 votes goes to:

    - use Kotlin as a scripting language in Unity, in addition to C# (over .NET)

    Jetbrain team made a great work with Unity-Rider integration, and could help Unity-Kotlin working together.

  3. 37445e7bd0c3b5076e7be59cb054875e?d=mm

    iRYO400

    Sep 12, 2018 06:51

    Gave it 10 votes. Kotlin is the most comfortable language for programming(mby because I had experience with Java and C# only)

  4. 9a3b13050980d7ae74eeca06b2f0aa41?d=mm

    Sirsehr

    Jul 10, 2018 09:01

    I would like to have kotlin as a scripting language in unity. Wouldn't it be possible to build a transpiler from kotlin to c#. Or maybe even implement a whole runtime inside .net (like jython for the jvm)?

  5. 969da4ea57a9de32f5e5faac13f7c563?d=mm

    Eric-Farraro

    Jun 19, 2018 14:05

    "- use Kotlin as a scripting language in Unity, in addition to C# (over .NET) " This is my interpretation of this idea. In addition to C#, I would like to be able to use Kotlin to write code in Unity.

  6. 3b6a33f6f51ec31db794d08fcafc853e?d=mm

    EloiNavarro

    Apr 19, 2018 09:47

    I was having the same doubts as YURY-HABETS.
    But since this idea seems to refer to "use Kotlin as a scripting language in Unity, in addition to C# (over .NET)".
    I created a new post asking for the other interpretation: "use Kotlin as a source for Android plugins compiled at build time."

    https://feedback.unity3d.com/suggestions/use-kotlin-as-androids-native-language

  7. 4fd1abace2bf570d4139bde0afc49699?d=mm

    liusilong007

    Mar 08, 2018 09:04

    I want to use Kotlin as a source for Android plugins compiled at build time. But now it will report an error. as follows:

    AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics;
    java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics;
    at com.lsl.plugin.PluginActivity.showToast(PluginActivity.kt)
    at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    at com.unity3d.player.UnityPlayer.c(Unknown Source)
    at com.unity3d.player.UnityPlayer$c$1.handleMessage(Unknown Source)
    at android.os.Handler.dispatchMessage(Handler.java)
    at android.os.Looper.loop(Looper.java)
    at com.unity3d.player.UnityPlayer$c.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: Didn't find class "kotlin.jvm.internal.Intrinsics" on path: DexPathList[[zip file "/data/app/com.lsl.aardemo-1/base.apk"],nativeLibraryDirectories=[/data/app/com.lsl.aardemo-1/lib/arm, /data/app/com.lsl.aardemo-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassL

  8. C884e0846a36a892c2ba0c3d752c81a8?d=mm

    KirkBushman

    Feb 26, 2018 09:24

    Zimm is kinda right, being able to compile natively isn't much but:
    With the kotlin2Js plugin you can convert kotlin code to javascript, at that point you would only need a wrapper in kotlin for the Unity libs.

    Like they did with react here: https://github.com/JetBrains/kotlin-wrappers/tree/master/kotlin-react

  9. 081f28ccf55646e6fe54c9c2aa890aca?d=mm

    Yury-Habets

    Jan 19, 2018 11:03

    The comments seem to mean two things:
    - use Kotlin as a scripting language in Unity, in addition to C# (over .NET)
    - use Kotlin as a source for Android plugins compiled at build time.

    Which one are you voting for?

  10. 689e3a29d94289e589fbd141eb34e648?d=mm

    Haapavuo

    Jan 10, 2018 18:46

    Why is this suggestion not visible on the top list since it already has over 60 votes?

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(10516)

2D

(274)

Ads

(52)

AI & Navigation

(78)

Analytics

(125)

Animation

(389)

Asset Store

(332)

Asset Store Publisher

(10)

Assets

(534)

Audio

(176)

Cloud Build

(139)

Collaborate

(57)

Docs & Tutorials

(237)

Editor

(2452)

Everyplay

(14)

Game Performance Reporting

(15)

General

(950)

Graphics

(861)

GUI

(422)

Input

(165)

Licensing

(88)

Networking

(185)

Physics

(380)

Platforms

(438)

Profiling & Optimization

(81)

Runtime

(180)

Scripting

(1147)

Terrain

(168)

WebGL

(141)