how to add physics component to an entity programmatically
Because the physics collider of the dots physics package don’t implement IComponentData they can’t be added with the standard AdComponentData from the entity manager so this snippet demonstrates how to cimcumbert this by using a ComponentType array as some sort of archetype declaration.
EntityManager entityManager = World.DefaultGameObjectInjectionWorld.EntityManager; ComponentType[] componentTypes = new ComponentType[3]; componentTypes[0] = typeof(PhysicsCollider); componentTypes[1] = typeof(TranslationProxy); componentTypes[2] = typeof(RotationProxy); Entity entity = entityManager.CreateEntity(componentTypes); BlobAssetReference<Unity.Physics.Collider> spCollider = Unity.Physics.SphereCollider.Create(float3.zero, 2f); entityManager.AddComponentData(entity, new Translation { Value = float3.zero }); entityManager.AddComponentData(entity, new Rotation { Value = quaternion.identity }); entityManager.SetComponentData(entity, new PhysicsCollider { Value = spCollider });
Here its how i configure bamboo to run unity through the command line and read the NUnit test results as valid input for the bamboo job
We run bamboo cloud and a dedicated computer as the agent with unity 5.3.3f1 installed.
First inside bamboo we need to specify what agent have unity, choose the agent that have unity installed and add a capability with the path where unity is installed.
Then inside a plan add a command task.
As the argument pass the unity command line options in my case it was
Note the bamboo variable ${bamboo.build.working.directory}, this is where bamboo checks out the code, we have the unity project at the root of the git repo.
I also output the NUnit test results file in the same folder for easy access in the next step, the NUnit Parser.
The file matcher with the wildcard automatically detect the test result file output in the same directory.
This is a preview with the current test.
And this are the same test inside unity in my development machine.