You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
958 B
24 lines
958 B
using UnityEngine;
|
|
|
|
namespace UnityEditor.VFX.Block
|
|
{
|
|
class CollisionSphereDeprecated : CollisionBase
|
|
{
|
|
public override string name { get { return "Collide with Sphere (deprecated)"; } }
|
|
|
|
public class InputProperties
|
|
{
|
|
[Tooltip("Sets the sphere with which particles can collide.")]
|
|
public Sphere Sphere = new Sphere() { radius = 1.0f };
|
|
}
|
|
|
|
public override void Sanitize(int version)
|
|
{
|
|
var newCollisionSphere = ScriptableObject.CreateInstance<CollisionSphereDeprecatedV2>();
|
|
SanitizeHelper.MigrateBlockTShapeFromShape(newCollisionSphere, this);
|
|
var newCollisionSphereShape = ScriptableObject.CreateInstance<CollisionShape>();
|
|
SanitizeHelper.MigrateBlockCollisionShapeToComposed(newCollisionSphereShape, newCollisionSphere, CollisionShapeBase.Type.Sphere);
|
|
ReplaceModel(newCollisionSphereShape, this);
|
|
}
|
|
}
|
|
}
|