30 lines
649 B
C#
30 lines
649 B
C#
// Copyright (c) Pixel Crushers. All rights reserved.
|
|
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
|
|
namespace PixelCrushers
|
|
{
|
|
|
|
/// <summary>
|
|
/// Checks if the scripting symbol USE_PHYSICS2D is defined.
|
|
/// </summary>
|
|
[AddComponentMenu("")] // Use wrapper instead.
|
|
public class CheckPhysics2D : MonoBehaviour
|
|
{
|
|
|
|
public UnityEvent usePhysics2DDefined = new UnityEvent();
|
|
public UnityEvent usePhysics2DUndefined = new UnityEvent();
|
|
|
|
private void Start()
|
|
{
|
|
#if USE_PHYSICS2D
|
|
usePhysics2DDefined.Invoke();
|
|
#else
|
|
usePhysics2DUndefined.Invoke();
|
|
#endif
|
|
}
|
|
}
|
|
|
|
}
|