/// <summary>Performs a sweep into the scene using a convex mesh and returns the closest found hit, if any.</summary> /// <param name="mesh">Mesh to sweep through the scene. Must be convex.</param> /// <param name="position">Starting position of the mesh.</param> /// <param name="rotation">Orientation of the mesh.</param> /// <param name="unitDir">Unit direction towards which to perform the sweep.</param> /// <param name="hit">Information recorded about a hit. Only valid if method returns true.</param> /// <param name="layer">Layers to consider for the query. This allows you to ignore certain groups of objects.</param> /// <param name="max"> /// Maximum distance at which to perform the query. Hits past this distance will not be detected. /// </param> /// <returns>True if something was hit, false otherwise.</returns> public static bool ConvexCast(RRef <PhysicsMesh> mesh, Vector3 position, Quaternion rotation, Vector3 unitDir, out PhysicsQueryHit hit, ulong layer = 18446744073709551615, float max = 3.40282347E+38f) { return(Internal_convexCast(mesh, ref position, ref rotation, ref unitDir, out hit, layer, max)); }
/// <summary>Creates a new sprite texture that references the entire area of the provided texture.</summary> public SpriteTexture(RRef <Texture> texture) { Internal_create(this, texture); }
/// <summary>Creates a new sprite texture that references a sub-area of the provided texture.</summary> public SpriteTexture(Vector2 uvOffset, Vector2 uvScale, RRef <Texture> texture) { Internal_create0(this, ref uvOffset, ref uvScale, texture); }
private static extern void Internal_create(SpriteTexture managedInstance, RRef <Texture> texture);
private static extern void Internal_create0(SpriteTexture managedInstance, ref Vector2 uvOffset, ref Vector2 uvScale, RRef <Texture> texture);
private static extern void Internal_setmesh(IntPtr thisPtr, RRef <Mesh> value);
private static extern void Internal_setTexture(IntPtr thisPtr, RRef <Texture> texture);
private static extern void Internal_setClip(IntPtr thisPtr, RRef <AudioClip> clip);
private static extern void Internal_setmaterial(IntPtr thisPtr, RRef <Material> value);
/// <summary> /// Sets a material that will be used for rendering a sub-mesh with the specified index. If a sub-mesh doesn't have a /// specific material set then the primary material will be used. /// </summary> public void SetMaterial(RRef <Material> material) { Internal_setMaterial0(mCachedPtr, material); }
private static extern void Internal_setMesh(IntPtr thisPtr, RRef <Mesh> mesh);
/// <summary> /// Sets a material that will be used for rendering a sub-mesh with the specified index. If a sub-mesh doesn't have a /// specific material set then the primary material will be used. /// </summary> public void SetMaterial(uint idx, RRef <Material> material) { Internal_setMaterial(mCachedPtr, idx, material); }
private static extern void Internal_setMaterial0(IntPtr thisPtr, RRef <Material> material);
private static extern void Internal_setTable(uint id, RRef <StringTable> table);
/// <summary>Registers a new string table or replaces an old one at the specified id.</summary> /// <param name="id">Identifier of the string table.</param> /// <param name="table">New string table to assign to the specified identifier.</param> public static void SetTable(uint id, RRef <StringTable> table) { Internal_setTable(id, table); }
private static extern void Internal_setMaterial(IntPtr thisPtr, RRef <PhysicsMaterial> material);