private void UpdateMaskCompCountInputs() { int cc = this["M"].GetCompCount(); base.texture.CompCount = cc; bool summed = channelBlendType == ChannelBlendType.Summed; //int enableInputCount = summed ? 4 : 5; for (int i = 0; i < 4; i++) { SF_NodeConnector con = connectors[i + 2]; //if(con.IsConnected() && con.inputCon.GetCompCount() != cc) // connectors[i+2].Disconnect(); bool use = i < cc; con.SetRequired(use); con.enableState = use ? EnableState.Enabled : EnableState.Disabled; // Disconnect if going hidden while connected, but not during load, as it might connect an unevaluated cc //if(!SF_Parser.quickLoad && !SF_Parser.settingUp){ if (con.IsConnected() && con.enableState == EnableState.Disabled) { //connectors[i+2].Disconnect(); //Debug.Log("Disconnecting thing due to things!"); } //} } this["BTM"].SetRequired(!summed); this["BTM"].enableState = summed ? EnableState.Disabled : EnableState.Enabled; }