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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Java and return

Discussion in 'Getting Started' started by oinky, May 27, 2020.

  1. oinky

    oinky

    Joined:
    Dec 8, 2019
    Posts:
    7
    I don't see Java script installed in my Unity platform. My return
    return (data + 5); does not work after passing data. Is this a Java code or function. Maybe Java isn't installed. Not sure.
     
  2. JoNax97

    JoNax97

    Joined:
    Feb 4, 2016
    Posts:
    611
    I'm not sure I understand your question, but Unity does not support Java. You should be writing your scripts in C#
     
  3. Th3T3chn0C0d3r

    Th3T3chn0C0d3r

    Joined:
    May 24, 2020
    Posts:
    3
    I think they are talking about JavaScript as opposed to actual Java
     
  4. JoNax97

    JoNax97

    Joined:
    Feb 4, 2016
    Posts:
    611
    Well in any case it's the same, JavaScript is not supported anymore.
     
  5. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    A couple things:
    1. Java and JavaScript are two separate languages. Unity supports neither.
    2. You'll have to provide more information than "it doesn't work" for anyone to help you.
    Please post your script using code tags here along with any error messages you might be getting.