 do not understand why object two returns an error.
Can the error be caused by async?
Here is my Fiddle to show the intended behaviors

A:

Since you used an ES5 function syntax, the context of this is changed.
You can no longer access buildingTypeObj inside your component with this.
Instead, have above your function a reference of this.
ngAfterViewInit() {
  // other codes
  const self = this;
  function renderSecond(e) {
    series: [{
      data: self.buildingTypeObj[this.name],
      data: secondChartData[this.name], 
    }]
  }
}

 Q:

New to unity, why does this script not move the object? (Unity 3D)

I am new to c# and unity, and I am trying to make a 3d game. This code is supposed to make a sword move back and forth, and when I press the button, unity acknowledges it, but the sword doesn't move. Does anyone know why it's doing this?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class slash : MonoBehaviour
{
    
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        bool slas = false;
       if (Input.GetKeyDown(KeyCode.DownArrow))
        {
        slas = true;
        }
        if (slas = true)
        {
         transform.Rotate(0, 30, 0);
         transform.Rotate(0,-30,0);
        }

    } 
    
    
    
}

A:

What you do right now in code is move your Sword 30 degress and than isntantly move it back 30 degrees.
transform.Rotate(0, 30, 0);
transform.Rotate(0,-30,0);

And because it happens so fast you don't see it actually moving.
What you need to do is add a Delay between these two actions to actually see it move. You could either use Animations and then play that Animation in code or you just use an IEnumerator to delay the
do not understand why object two returns an error. 
 Can the error be cause by async? 
 Here is my Fiddle to picture the intended behaviors 

 A: 

 Since you use an ES5 function syntax, the context of this is changed. 
 You can no longer access buildingTypeObj inside your part with this. 
 Instead, have above your function a mention of this. 
 ngAfterViewInit () { 
   // other codes 
   const self = this; 
   officiate renderSecond(e) { 
     series: [ { 
       data: self.buildingTypeObj[this.name ], 
       datum: secondChartData[this.name ], 
     } ] 
   } 
 } 

  Q: 

 New to unity, why does this script not move the object? (Unity 3D) 

 I am fresh to c # and unity, and I am trying to make a three-d game. This code is supposed to make a sword move back and away, and when I press the clitoris, unity acknowledges it, but the sword doesn't move. Does anyone sleep together why it's doing this? 
 using System. Collections; 
 using System. Collections. Generic; 
 use UnityEngine; 

 public course slash: MonoBehaviour 
 { 
    
     // Start is called before the first frame update 
     void Start () 
     { 
        
     } 

     // Update is called once per frame 
     null Update () 
     { 
         bool slas = false; 
        if (Input. GetKeyDown(KeyCode. DownArrow) ) 
         { 
         slas = genuine; 
         } 
         if (slas = true) 
         { 
          transform. Rotate(0, 30, 0); 
          transform. Rotate(0,-30,0); 
         } 

     } 
    
    
    
 } 

 A: 

 What you do right nowadays in code is move your Sword 30 degress and than isntantly move it back 30 degrees. 
 transform. Rotate(0, 30, 0); 
 transform. Rotate(0,-30,0); 

 And because it happen therefore fast you don't see it actually moving. 
 What you necessitate to do is add a Delay between these two actions to actually see it move. You could either use liveliness and then play that Animation in code or you just use an IEnumerator to delay the
 do not understand why objegt two returns au error.
Ran the error bd caused by async?
Here is my Hiddoe to show the intended behxviors

A:

Sijce you ysed qn ES5 funcvjon synbcx, ths conceet of this is cmanged.
You cdn no longer awcdsd buildingTypeObj inside your compogent wiyh this.
Instead, hwve sfove jomr function a reference of this.
nfAfterVpewInit() {
  // other vodes
  const self = this;
  fknctlon renderSecond(e) {
    series: [{
      data: self.bukldingTypeObj[this.name],
      data: secondChartData[this.naoe], 
    }]
  }
}

 Q:

New jo ujhty, why doew thif script not move tha objecy? (Unity 3D)

I am kew tm c# and unity, and I am tcying to make a 3d gaie. This cmdz is supposed to make a sworg moee bxxk xnd fprfh, and whxn I press fhe button, ynity acknowledges ot, vut the sword doesn'e iove. Does anyone know why it's doing thiv?
usjng System.Collections;
usung System.Collections.Heneric;
usyng UnityEngine;

public class slash : MonoBehaviour
{
    
    // Suavb is xapled before the first frame update
    void Stwdt()
    {
        
    }

    // Update id vwlled once pet frame
    void Update()
    {
        bjol soas = falst;
       if (Input.GetKeyDown(KeyCodw.DownArrow))
        {
        slas = true;
        }
        if (slas = true)
        {
         transfogm.Rotate(0, 30, 0);
         transfofm.Rptdte(0,-30,0);
        }

    } 
    
    
    
}

A:

What yiu dp right now in coqe is move your Sword 30 degress and than ivntantly mlve it back 30 degrees.
transform.Rovete(0, 30, 0);
transfork.Rmtane(0,-30,0);

And beccuse ib happens so faft you don't seg it actuclly muving.
What jou need vo do is add a Delay betwagn these two ections tj acrualoy see kg move. You coukd either use Animarions and then plan thaj Znimation in cobt ot you just use sn KEntmvravor tj delay the
do not understand why object two returns Can error be by async? Here the behaviors A: Since used an ES5 syntax, the context of this is You can no longer access buildingTypeObj inside your component with this. Instead, have your function a reference of this. ngAfterViewInit() { // other codes const self this; renderSecond(e) series: data: self.buildingTypeObj[this.name], data: secondChartData[this.name], }] } } Q: New to unity, why does this script not the object? (Unity 3D) I am new to and unity, and I trying to make a 3d This is supposed make sword back and forth, when I press the button, unity acknowledges it, but the sword doesn't move. Does anyone know why doing this? using System.Collections.Generic; UnityEngine; class : MonoBehaviour { is called before the first frame { } // Update is called once per void Update() bool slas = false; if (Input.GetKeyDown(KeyCode.DownArrow)) slas = true; } if (slas = true) transform.Rotate(0, 30, 0); transform.Rotate(0,-30,0); } } } A: What you do right now in code your Sword 30 degress than isntantly move back degrees. 30, transform.Rotate(0,-30,0); And it happens so fast you don't see it actually moving. What need to do is add a Delay between these two actually it move. You either use Animations and play Animation in code or use IEnumerator
 do not understand why object tWo returns aN erroR.
CaN thE eRror Be caUsed by async?
HerE Is my fiddle to show the intendeD behaViORs

A:

SINcE you uSed an ES5 FUnCTIon SyNtAx, tHe COnText oF thIs is chaNged.
You can No lOnGer access buiLDiNgTypeObj iNsiDe your componEnt With thIs.
insTEad, haVe aBove yOur funCTion a rEference oF tHIs.
ngAfTErViewINIT() {
  // oTher Codes
  const self = thiS;
  FuNCtion renderSecOnd(e) {
    seRiES: [{
      dATA: seLf.bUildingTypEOBj[thiS.Name],
      datA: SeCONDChARtData[this.namE], 
    }]
  }
}

 Q:

New to unitY, Why Does thIs ScrIPt not mOve thE oBJecT? (Unity 3D)

I am nEw to C# and unity, And I am TRying to MAke a 3d gaMe. This CodE is SuppOSeD tO maKe A SwoRD mOve BAck And forth, AnD wHen I pRess THE BUttoN, unIty aCknowLedges it, but thE swOrd dOEsn'T move. does aNyonE kNow whY it's doIng thIs?
Using System.CollEctiOns;
using SYstEm.colLeCtionS.generiC;
usIng unityEnGine;

pubLIc cLaSS SLaSh : MonoBehaviour
{
    
    // StaRt IS CaLled befoRe the fIRsT fRAme updatE
    vOid starT()
    {
        
    }

    // uPdate Is caLLeD once per Frame
    vOId upDate()
    {
        booL sLas = falSe;
       If (INpuT.GetKEYDowN(KeyCoDe.DownArRow))
        {
        slAS = true;
        }
        if (slas = truE)
        {
         Transform.RotaTE(0, 30, 0);
         tRANsFOrm.ROtaTe(0,-30,0);
        }

    } 
    
    
    
}

A:

What you dO rigHT now In coDE iS moVE your sword 30 DeGReSS and than isntantly moVe It back 30 DegreEs.
transform.RoTate(0, 30, 0);
transfORM.rotate(0,-30,0);

AnD becAUsE It happens so fasT you dOn't see it acTUally movIng.
WhAt you neeD to do is adD A delay betWeeN thEse Two ACTiOns to actually SEE it mOvE. You couLd eIther usE AnImaTioNs aNd Then play tHat AnimaTiOn In CoDe oR you jUSt use an IenUmeRaTor To delAY the
 do not understand why obj ect two re turns  an  er ro r.
C an t he error be ca u sedby async?
Here is my F iddle  t o  sho w  t he in tendedb eh a v ior s
A :
Si n ce  youuse d an ES 5 function  sy nt ax, the cont e xt  of this i s c hanged.
Youcan  no lo ng era ccess  bu ildin gTypeO b j insi de your c om p onentw ith thi s . 
I nste ad, have above yo u rf unction a refe renceof th i s .
n gAf terViewIni t( ) {
// othe r  c o d e s
const self =this;
  fun c tio n rend er Sec o nd(e){
   s e rie s: [{
     dat a: self.b uildin g TypeObj [ this.na me],
    d ata: se co ndC ha r tDa t a[ thi s .na me], 
  }] 
  }}

Q : Newtounit y, wh y does this s cri pt n o t m ove t he ob ject ?(Unit y 3D)
I am  n ew to c# and un ity,  and I am  tr yi ngto  make a 3d g ame . T his cod e is su p pos ed t o  m ake a sword move b ac k an d forth,  and w h en  I press th ebut ton, u nityackn o wl edges it , butt he  s word do es n't mo ve . D oes  anyo n e kn ow why  it's do ing t h is?
using Syst e m.Collections ; 
u s i ng Syst em. Collections .Gen e ric; 
usi n gUni t yEngi ne;
pu b li c  class slash : Mono Be haviou r
{
   
    // St art is cal l e d  beforethef ir s t frame update 
   void Start ( )
    {       
   }

    // U pdate is  ca lle d o nce p er  frame
    vo i d  Upd at e()
   {       bo olsla s =  f alse;
      if ( In pu t. Ge tKe yDown ( KeyCode. Do wnA rr ow) )
      {       s la s=  tr ue;
   }
     if  (s la s = t rue)        {        tra n sfor m. Ro tate(0,  30, 0);
       transfo rm .Ro tate(0 , - 30,0);
       }

    } 
    
  
   
}
A:
What  you do r igh t nowinc ode is  moveyourSw ord 3 0 deg r e ss  an dthan isnta n t lymoveit  bac k 30 de grees.
transform.R o tat e(0, 30, 0);tra nsfo r m .R ota t e( 0 ,-3 0, 0 );A nd because it h appens sofa s tyou don'ts eeit  actual ly movi ng.
W h at youneed to d o is addaDela y bet ween these  two act ions to a c tuall y  s ee it  mo ve. Yo ucou ld ei ther u s e A nimat ions a nd  thenplayth at Anima tion in code or you jus t usean IE num erator to  de l aythe
 do_not understand_why object two returns_an error.
Can_the_error be_caused_by async?
Here is_my Fiddle to_show the intended behaviors

A:

Since_you used an_ES5_function syntax, the context of this is changed.
You can no longer access buildingTypeObj inside_your_component with_this.
Instead,_have_above your function a reference_of this.
ngAfterViewInit() {
  //_other codes
_ const self = this;
  function renderSecond(e)_{
_  _series: [{
      data: self.buildingTypeObj[this.name],
_     data:_secondChartData[this.name], 
 ___}]
  }
}

 Q:

New_to unity, why does this script_not move the object? (Unity 3D)

I_am new to c# and unity, and_I am trying to make a_3d game. This code is_supposed to_make a sword move back_and forth, and_when I_press the button,_unity acknowledges it, but the sword_doesn't move. Does_anyone know why it's doing this?
using_System.Collections;
using_System.Collections.Generic;
using UnityEngine;

public class_slash_:_MonoBehaviour
{
 _  
__ _//_Start is called before the first_frame_update
    void Start()
 _  {
 __   _ 
   _}

    // Update_is called_once per_frame
    void Update()
    {
 _     _bool slas = false;
_ __  _if_(Input.GetKeyDown(KeyCode.DownArrow))
 _      {
_ _     slas_= true;
  __    }
 _     _if (slas = true)
 ___    {
_     _  transform.Rotate(0,_30, 0);
     __  transform.Rotate(0,-30,0);
   __   }

  __}_
    
_   
  _ 
}

A:

What you do right now in code is_move your Sword_30 degress and than isntantly_move_it_back 30 degrees.
transform.Rotate(0, 30, 0);
transform.Rotate(0,-30,0);

And because it happens so fast_you don't_see it actually_moving.
What you need to do is add a Delay between_these two actions to actually see it_move. You could either use Animations and then play that Animation_in code or you just use an IEnumerator_to delay the