コード例 #1
0
    void OnInstalledObjectDestroyed(InstalledObject io_data)
    {
        if (!map_InstalledObject2GameObject.ContainsKey(io_data))
        {
            Debug.LogError("Tried to destroy an InstalledObject that doesn't exist - this should never happen.");
            return;
        }

        // Destroy the visual representation of the InstalledObject
        Destroy(map_InstalledObject2GameObject [io_data]);

        // Remove the record of the InstalledObject
        map_InstalledObject2GameObject.Remove(io_data);


        io_data.UnregisterCB_OnStateChanged(OnInstalledObjectStateChanged);
        io_data = null;
    }