mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 23:50:29 +01:00
Add api (#5)
* Add API * Added API * Updated version * Updated RNUI * Added checks for null paths * BelongsToPath menu item now toggles on/off depending if any paths exist
This commit is contained in:
parent
d118513185
commit
56a770b718
10 changed files with 63 additions and 22 deletions
|
|
@ -149,7 +149,7 @@ namespace SceneManager.Managers
|
|||
|
||||
if (barrier != null && BarrierMenu.BelongsToPath.Checked)
|
||||
{
|
||||
var matchingPath = PathManager.Paths.FirstOrDefault(x => x.Name == BarrierMenu.AddToPath.OptionText);
|
||||
var matchingPath = PathManager.Paths.FirstOrDefault(x => x != null && x.Name == BarrierMenu.AddToPath.OptionText);
|
||||
if(matchingPath != null)
|
||||
{
|
||||
matchingPath.Barriers.Add(barrier);
|
||||
|
|
@ -257,7 +257,7 @@ namespace SceneManager.Managers
|
|||
return;
|
||||
}
|
||||
|
||||
var pathToAssignTo = PathManager.Paths.First(x => x.Name == BarrierMenu.AddUnassignedToPath.OptionText);
|
||||
var pathToAssignTo = PathManager.Paths.First(x => x != null && x.Name == BarrierMenu.AddUnassignedToPath.OptionText);
|
||||
foreach (Barrier barrier in unassignedBarriers)
|
||||
{
|
||||
pathToAssignTo.Barriers.Add(barrier);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue