Example #1
0
    void CreateSwitch(AkDragDropGroupData DDGroupData)
    {
        AkSwitch akSwitch = Undo.AddComponent <AkSwitch>(gameObject);

        if (akSwitch != null)
        {
            SetTypeValue(ref akSwitch.valueGuid, ref akSwitch.valueID, DDGroupData);
            SetGroupTypeValue(ref akSwitch.groupGuid, ref akSwitch.groupID, DDGroupData);
        }
    }
Example #2
0
    void CreateSwitch(Guid componentGuid, int ID, Guid groupGuid, int groupID)
    {
        AkSwitch akSwitch = Undo.AddComponent <AkSwitch>(gameObject);

        if (akSwitch != null)
        {
            akSwitch.groupGuid = groupGuid.ToByteArray();
            akSwitch.groupID   = groupID;
            akSwitch.valueGuid = componentGuid.ToByteArray();
            akSwitch.valueID   = ID;
        }
    }
Example #3
0
    void CreateSwitch(string componentGuid, int ID, string groupGuid, int groupID)
    {
        AkSwitch akSwitch = Undo.AddComponent <AkSwitch>(gameObject);

        if (akSwitch != null)
        {
            akSwitch.groupGuid = new Guid(groupGuid).ToByteArray();
            akSwitch.groupID   = groupID;
            akSwitch.valueGuid = new Guid(componentGuid).ToByteArray();
            akSwitch.valueID   = ID;
        }
    }