Generic method not supported by lua

1. No generic constraints

2. Missing generic parameters with constraints

3. Generic constraints must be class

1      ///  <summary> 
2      /// Generic methods for generating lua are not supported (without generic constraints)
 3      ///  </summary> 
4      public  void UnsupportedMethod1<T> (T a)
 5      {
 6          Debug.Log ( " UnsupportedMethod1 " );
 7      }
 8  
9      ///  <summary> 
10      /// Generic methods that generate lua are not supported (missing generic parameters with constraints)
 11      ///  </summary> 
12      public  void UnsupportedMethod2< T>() where T : Foo1Parent
 13      {
 14         Debug.Log( string .Format( " UnsupportedMethod2<{0}> " , typeof (T)));
 15      }
 16  
17      ///  <summary> 
18      /// Generic methods that generate lua are not supported (generic constraints must be class)
 19      ///  </summary> 
20      public  void UnsupportedMethod3<T>(T a) where T : IDisposable
 21      {
 22          Debug.Log( string .Format( " UnsupportedMethod3<{0}> " , typeof (T )));
 23      }

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325129060&siteId=291194637