Duality.Log.FindContext C# (CSharp) Method

FindContext() private method

private FindContext ( object obj ) : object
obj object
return object
        private object FindContext(object[] obj)
        {
            if (obj == null || obj.Length == 0) return null;
            for (int i = 0; i < obj.Length; i++)
            {
                if (obj[i] is GameObject || obj[i] is Component || obj[i] is Resource || obj[i] is IContentRef)
                    return obj[i];
            }
            return obj[0];
        }