You need to calculate the triangle’s normal vector using the cross product, and then compare that normal vector to the ray’s direction vector using the dot product
Vector3 normal = Vector3.Cross(p1-p0, p2-p1);
float normalDotRay = Vector3.Dot(normal, rayVector);
bool isCW = normalDotRay > 0; // or < 0, try what works