[Mono-ue] How do you use GetOverlappingActors?

Michael Hutchinson m.j.hutchinson at gmail.com
Thu Jan 8 22:18:46 UTC 2015


SubclassOf<T> is analogous to the Unreal TSubclassOf<T> template:
https://docs.unrealengine.com/latest/INT/API/Runtime/CoreUObject/UObject/TSubclassOf/index.html

That said, the "subclass" terminology is confusing and it would
probably make sense for us to rename it to UClass. I've added this to
our task tracker.

This particular method is autogenerated and it looks like the
generator doesn't handle the fact that the classFilter parameter is
optional. I've added this to the tracker too but you should be able to
work around it by using default(SubclassOf<Object>) which would have a
null UClass pointer.

- m

On 5 January 2015 at 06:50, Ryan Burnham <nitro52 at iinet.net.au> wrote:
> Hi All,
>
>
>
> So I’m trying to convert the following C++ code
>
>
>
>        TArray<AActor*> CollectedActors;
>
>        CollectionSphere->GetOverlappingActors(CollectedActors);
>
>
>
>
>
> Where CollectionShpere is defined as
>
>
>
>        UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Power)
>
>               TSubobjectPtr<class USphereComponent> CollectionSphere;
>
>
>
>
>
>
>
>
>
> So I was thinking it would be something like this
>
>             IList<Actor> collectedActors;
>             CollectionSphere.GetOverlappingActors(out collectedActors);
>
>
>
> But GetOverlappingActors only has an overload with 2 parameters.
>
>
>
> public unsafe void GetOverlappingActors(out IList<Actor> overlappingActors,
> SubclassOf<Object> classFilter)
>
>
>
> How do you get the class filter. These SubclassOf and Subobject wrappers
> seem a bit odd to me.
>
>
>
> Regards
>
> Ryan
>
>
> _______________________________________________
> Mono-ue mailing list
> Mono-ue at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-ue
>



-- 
Michael Hutchinson ~ https://mhut.ch


More information about the Mono-ue mailing list