You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -770,15 +771,13 @@ public Entity GetPointedEntity(Commands commands, Composite startComposite, out
770
771
/* Get the ID of the entity that this path points to */
771
772
publicShortGuidGetPointedEntityID()
772
773
{
773
-
path.Reverse();
774
774
ShortGuidid=ShortGuid.Invalid;
775
-
for(inti=0;i<path.Count;i++)
775
+
for(inti=path.Count-1;i>=0;i--)
776
776
{
777
777
if(path[i]==ShortGuid.Invalid)continue;
778
778
id=path[i];
779
779
break;
780
780
}
781
-
path.Reverse();
782
781
returnid;
783
782
}
784
783
@@ -807,31 +806,15 @@ public ShortGuid GeneratePathHash()
807
806
}
808
807
809
808
/* Generate the instance ID used to identify the instanced composite we're executed in */
810
-
publicShortGuidGenerateInstance()
809
+
publicShortGuidGenerateCompositeInstanceID(boolhasInternalEntityID=true)//Set this to false the final value in the path is not an entity ID within the composite
811
810
{
812
-
//TODO: This hijacks the usual use for this class, need to tidy it up
/* Updates this path to have the path to another entity prepended to it */
@@ -843,6 +826,30 @@ public void PrependPath(EntityPath otherPath)
843
826
}
844
827
}
845
828
829
+
publicstaticclassPathUtils
830
+
{
831
+
/* Generate the instance ID used to identify the instanced composite we're executed in */
832
+
publicstaticShortGuidGenerateCompositeInstanceID(thisList<ShortGuid>path,boolhasInternalEntityID=true)//Set this to false the final value in the path is not an entity ID within the composite
0 commit comments