Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Trying to Make Static Classes Into Extensions of Unity's Classes but Getting Errors

$
0
0
I've had a nice little set of methods that I've created over the years and have had them in static classes so that I could call them from anywhere. The only (slight) downside to this is that I have to set my data equal to the class.method. I'd like to just use the method directly from the current object. What I've been doing is:
Code (csharp):
  1.  
  2. transform.position = Vector3x.SmoothFollow(blah, blah, blah);
  3.  
What I'm trying to do is:
Code (csharp):
  1.  
  2. transform.position.SmoothFollow(blah, blah, blah);
  3.  
...

Trying to Make Static Classes Into Extensions of Unity's Classes but Getting Errors

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>