• Benvenuto in Making Videogames!
  • Dai sfogo alla tua fantasia!
  • Crea il tuo Videogioco!
Benvenuto ospite! Login Registrati




Valutazione discussione:
  • 0 voto(i) - 0 media
  • 1
  • 2
  • 3
  • 4
  • 5
help get component
#10
ho fatto come dici
if (!m_CharacterController.isGrounded || inwater == true);

ma mi da questo errore

Severity Code Description Project File Line Suppression State
Error CS0103 The name 'inwater' does not exist in the current context L.O.S.T. Pre Alpha v0.1.CSharp.Plugins C:\Users\Peppe\Documents\L.O.S.T. Pre Alpha v0.1\Assets\Standard Assets\Characters\FirstPersonCharacter\Scripts\FirstPersonController.cs 214 Active

perchè la variable non è dichiarata all'interno del firstpersoncontroller.cs giusto?

ma la variabile si trova nello script Swim.cs come t iavevo scritto in alcuni post fa..
allora ho provato a fare come per gli altri script con il Getcomponent cosi:

if (!m_CharacterController.isGrounded || this.gameObject.GetComponent<Swim>().inwater == true)


ma mi viene dato l'errore

Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'Swim' could not be found (are you missing a using directive or an assembly reference?) L.O.S.T. Pre Alpha v0.1.CSharp.Plugins C:\Users\Peppe\Documents\L.O.S.T. Pre Alpha v0.1\Assets\Standard Assets\Characters\FirstPersonCharacter\Scripts\FirstPersonController.cs 214 Active
 
Rispondi
  


Messaggi in questa discussione
help get component - da JC LEON - 25-08-2016, 08:26 PM
RE: help get component - da Zettamax - 25-08-2016, 09:55 PM
RE: help get component - da JC LEON - 25-08-2016, 10:50 PM
RE: help get component - da Zettamax - 25-08-2016, 11:14 PM
RE: help get component - da JC LEON - 26-08-2016, 12:41 AM
RE: help get component - da alessiobb3b - 26-08-2016, 07:34 PM
RE: help get component - da Zettamax - 26-08-2016, 08:44 PM
RE: help get component - da JC LEON - 27-08-2016, 01:26 AM
RE: help get component - da Zettamax - 27-08-2016, 09:34 PM
RE: help get component - da JC LEON - 28-08-2016, 11:58 AM
RE: help get component - da Zettamax - 28-08-2016, 12:54 PM
RE: help get component - da JC LEON - 28-08-2016, 02:28 PM
RE: help get component - da Zettamax - 28-08-2016, 04:37 PM

Vai al forum:


Browsing: 1 Ospite(i)