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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Problems between Scripts

Discussion in 'Scripting' started by Real3dvision, Oct 5, 2015.

  1. Real3dvision

    Real3dvision

    Joined:
    Jul 3, 2015
    Posts:
    13
    Hello,
    I have a problem between Scripts. I like to use in a script one method of other script which belong to other gameobject . But it´s wrong...
    Somebody could help me please?
    Regards.





     
  2. martinmr

    martinmr

    Joined:
    Mar 25, 2015
    Posts:
    325
    Code (CSharp):
    1. public void Subir_C1 () {
    2. }
    make it public so other scripts can use it the way you want

    Check out the difference
    public,, private, protected
    will be usefull in future
     
  3. Real3dvision

    Real3dvision

    Joined:
    Jul 3, 2015
    Posts:
    13
    It's right. Thanks a lot!!!
    I will check out the difference!!!