public static Offset <Component> CreateComponent(FlatBufferBuilder builder, UComponent comp_type = UComponent.NONE, int compOffset = 0) { builder.StartObject(2); Component.AddComp(builder, compOffset); Component.AddCompType(builder, comp_type); return(Component.EndComponent(builder)); }
public static Component GetComponent(this GameObject obj, UComponent uType) { Type sType = null; if (LuaGenConfig.uComponentDict.TryGetValue(uType, out sType)) { return(obj.GetComponent(sType)); } return(null); }
public static void AddCompType(FlatBufferBuilder builder, UComponent compType) { builder.AddByte(0, (byte)compType, 0); }