consulo / consulo-csharp

Languages: C#
Apache License 2.0
50 stars 6 forks source link

Extension method: Modifier "this" is not valid for this item #520

Closed NIA closed 6 years ago

NIA commented 6 years ago
    public static class GameObjectUtils {
        public static string GetFullPath(this Transform transform) {
            string path = transform.name;
            while (transform.parent != null) {
                transform = transform.parent;
                path = transform.name + "/" + path;
            }
            return path;
        }
    }

image

This happens on every extension method in every static class, both in my Unity and plain C# projects.

VISTALL commented 6 years ago

Hello. Fixed. It's my mistake (i added this modifier to generic parameter not parameter :D)

Thanks