private string GetElementTypePrefabPath(TechGroupConfig.TechElement element) { var type = GetTechElementType(element); switch (type) { case TechElementType.Simple: return UIPath.PrefabPath.Tech_Element_Simple; default: return null; } }
private TechElementType GetTechElementType(TechGroupConfig.TechElement element) { if (element.ElementType == 1) { return TechElementType.Simple; }else if (element.ElementType == 2) { return TechElementType.Complex; } Debug.LogError("Parse Tech ElementType Error! Index=" + element.Index); return TechElementType.Simple; }