Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Raycasts in Edit Mode

Discussion in 'DOTS Physics' started by bartekOrbital, Jul 12, 2021.

  1. bartekOrbital

    bartekOrbital

    Joined:
    Feb 28, 2020
    Posts:
    1
    Hello, is it possible to raycast in edit mode at the moment? I'm having trouble with accessing PhysicsWorld from my MonoBehaviour. It seems like Editor World doesn't have PhysicsWorld, but maybe there is a workaround?


    Code (CSharp):
    1. var world = World.DefaultGameObjectInjectionWorld.GetExistingSystem<BuildPhysicsWorld>().PhysicsWorld;
     
  2. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    480
    No, the PhysicsWorld is runtime only at the minute.
     
unityunity