Quantcast
Channel: Answers by "robinking"
Viewing full articles (24 articles)
Browse article index
↧

Answer by robinking

$
0
0
Ben 12's answer above has provided me with a direction to head in, but I've encountered one problem I can't figure out: public class Smooth { public SM target; public Smooth() {} public void Inc(float i) { if (target.GetType().FullName=="System.Single") { target++; } else if (target.GetType().FullName=="UnityEngine.Vector3") { target.x++; } } } The above (which I want to be able to instantiate as a float or a vector3) results in the following compile error: ***error CS1061: Type `SM' does not contain a definition for `x' and no extension method `x' of type `SM' could be found (are you missing a using directive or an assembly reference?)***
↧

Viewing full articles (24 articles)
Browse article index

Latest Images

Trending Articles



Latest Images