private static void GenerateJsTypeInfoConfig() { string filePath = JSPathSettings.JsTypeInfoConfig; File.WriteAllText(filePath, JsonMapper.ToJson(JsTypeNameSet.ToArray())); Debug.Log(string.Format("JsTypeInfoConfig:{0}\nOK. File: {1}", JsTypeNameSet.Count, filePath)); }
/// <summary> /// Wills the type be translated to javascript. /// </summary> /// <param name="type">The type.</param> /// <returns></returns> public static bool WillTypeBeTranslatedToJavaScript(Type type) { if (type.IsDefined(typeof(JsTypeAttribute), false)) { return(true); } if (JsTypeNameSet.Contains(type.FullName)) { return(true); } return(false); }