Quantcast
Channel: Questions in topic: "namespace"
Viewing all articles
Browse latest Browse all 398

How to commuunicate scripts form default namespace?

$
0
0
Hi, I got a problem. How to take values form script One to script Two, when the first script is in different namespace? I mean i got something just like this (let's say it is so short) first script: using System.Collections; using System.Collections.Generic; using UnityEngine; public class ScriptOne : MonoBehaviour { public float iWantThisVariableInAnotherScript; } And I want to have an access to this variable in another script (it's ready script in Unity - FirstPersonController, so I guess all of you know that script). And it looks like: namespace UnityStandardAssets.Characters.FirstPerson { [RequireComponent(typeof (CharacterController))] [RequireComponent(typeof (AudioSource))] public class FirstPersonController : MonoBehaviour { AND HERE, HOW TO GET ACCESS TO MY public float iWantThisVariableInAnotherScript ?? } } I am sorry for my spelling mistakes, be permissive :) I'm waiting for Your responses.

Viewing all articles
Browse latest Browse all 398

Trending Articles