Page MenuHomeFeedback Tracker

PointInfo crashes Workbench
Assigned, NormalPublic

Description

I have created a new ScriptedUserAction to spawn a vehicle. I have one attribute inside the user action of type Point Info. When using PointInfo#GetWorldTransform() or PointInfo#GetTransform() methods, the entire workbench crashes. Here is my sample code,

class TEST_VehicleSpawnUserAction : ScriptedUserAction
{	
    [Attribute("0 0 0", UIWidgets.Auto, "Test", "")]
    protected ref PointInfo m_VehicleSpawnLocation;
	
	override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
	{		
		Resource resource = Resource.Load("{C012BB3488BEA0C2}Prefabs/Vehicles/Wheeled/BTR70/BTR70.et");
		if (!resource)
			return;
		
		ref EntitySpawnParams params = new EntitySpawnParams();
		params.TransformMode = ETransformMode.WORLD;
		
		if (!m_VehicleSpawnLocation)
			return;
		
		m_VehicleSpawnLocation.GetWorldTransform(params.Transform);
		
		GetGame().SpawnEntityPrefab(resource, pOwnerEntity.GetWorld(), params);
	}
};

And here is the properties pane for the UserAction attached to the prefab: https://gyazo.com/6dce3c26b8f15f2a063dcd54b1ae1b98

Details

Severity
Crash
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce

Run code above.

Event Timeline

Digitals created this task.May 20 2022, 2:47 PM
Digitals updated the task description. (Show Details)
Geez changed the task status from New to Assigned.May 24 2022, 11:53 AM

Having exactly sane issue.