MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetBox

Method GetBox

Source/Editor/Surface/SurfaceNode.cs:554–563  ·  view source on GitHub ↗

Tries to get box with given ID. The box id. Box or null if cannot find.

(int id)

Source from the content-addressed store, hash-verified

552 /// <param name="id">The box id.</param>
553 /// <returns>Box or null if cannot find.</returns>
554 public Box GetBox(int id)
555 {
556 // TODO: maybe create local cache for boxes? but not a dictionary, use lookup table because ids are usually small (less than 20)
557 for (int i = 0; i < Elements.Count; i++)
558 {
559 if (Elements[i] is Box box && box.ID == id)
560 return box;
561 }
562 return null;
563 }
564
565 /// <summary>
566 /// Tries to get box with given ID.

Callers 10

PasteMethod · 0.45
LoadMethod · 0.45
LoadGraphMethod · 0.45
OnThumbnailDrawBeginMethod · 0.45
OnAssetLoadedMethod · 0.45
OnBeginMethod · 0.45
OnBeginMethod · 0.45
GetBoundsMethod · 0.45
OnBeginMethod · 0.45
SearchMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected