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

Have A Class Find Itself In A List

$
0
0
I'm trying to have an object (of type Car) find the preceding car in a list. All of the Cars in the scene are added to the list so it will be in the list. I've tried using the FindIndex method, passing it "this" as an argument, but I get an error. Its refers to System.Predicate and I've never heard of or used it. Maybe I'm just going about this the wrong way, is there a simple method that I've passed up or does someone just need to teach me how to give the method a Predicate? Here's my code:...

Have A Class Find Itself In A List

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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