Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Call non-monobehaviour methods in Java plugin.

Discussion in 'Scripting' started by Deleted User, Sep 12, 2018.

  1. Deleted User

    Deleted User

    Guest

    Hi.
    Is this possible to call JavaCallback() method from a Java plugin?
    Code (CSharp):
    1. public static class CSharpClass
    2. {
    3.      public static void JavaCallback()
    4.      {
    5.  
    6.      }
    7. }
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,635
    Deleted User likes this.
  3. Deleted User

    Deleted User

    Guest

    It's so helpful!
    I totally forgot about AndroidJavaProxy.
    I was thinking about using UnitySendMessage function to send message through, but with AndroidJavaProxy I can achieve the same thing in a cleaner way.

    Thanks!