Sprite Factory

ReadMe
Release Notes
Overview
Using the Editor
Upgrading

Concepts
Sprites
Master Sprites
Sprite Groups
Colliders
Locators
Material Sets
SpriteUpdater
SpriteCamera

Advanced
Working in Multiple Projects

Classes
Runtime Classes

Videos
Overview
Creating Sprites
Sprite Inspector
Frame Events
Collision System
Locator System
Material Sets

Links
Sprite Factory Site
Web Documentation
Support
Contact

SpriteFactory.SpriteCollider

Namespace: SpriteFactory
Inherits from MonoBehaviour

This component is created automatically when a Sprite generates a collider. The main purpose of this component is to send messages on collision events.

Variables

       
Name   Type   Description
gameObject   GameObject   GameObject of this component. * This is for internal use and should not be changed. *
transform   Transform   Transform of this component. * This is for internal use and should not be changed. *
colliderInfo   ColliderInfo   ColliderInfo on this GameObject. * This is for internal use and should not be changed. *
rigidbodyInfo   RigidbodyInfo   RigidbodyInfo on this GameObject. * This is for internal use and should not be changed. *

 

Properties

       
sprite   Sprite   Parent Sprite of this SpriteCollider. (Read-only)
spriteRoot   GameObject   GameObject of the parent Sprite of this SpriteCollider. (Read-only)
spriteColliderName   string   Name of the Collider Set. (Read-only)
spriteColliderId   int   Id of the Collider Set. (Read-only)
spriteColliderTag   int   Tag of the Collider Set. (Read-only)
spriteColliderGroupName   string   Name of the Collider Set group. (Read-only)
isParent   bool   Is this a Parent Collider Set? (Read-only)

 

Messages Sent

Name   Description
OnMouseEnterSprite   Called when the mouse entered the Collider.
OnMouseOverSprite   Called every frame while the mouse is over the Collider.
OnMouseExitSprite   Called when the mouse is not any longer over the Collider.
OnMouseDownSprite   Called when the user has pressed the mouse button while over the Collider.
OnMouseUpAsButtonSprite   Only called when the mouse is released over the same Collider as it was pressed.
OnMouseDragSprite   Called when the user has clicked on a Collider and is still holding down the mouse.
OnTriggerEnterSprite   Called when a Collider enters the trigger.
OnTriggerStaySprite   Called almost all the frames for every Collider that is touching the trigger.
OnTriggerExitSprite   Called when a Collider has stopped touching the trigger.
OnCollisionEnterSprite   Called when this collider/rigidbody has begun touching another rigidbody/collider.
OnCollisionStaySprite   Called once per frame for every collider/rigidbody that is touching rigidbody/collider.
OnCollisionExitSprite   Called when this collider/rigidbody has stopped touching another rigidbody/collider.
OnParticleCollisionSprite   Called when a particle hits a collider (legacy particle system only).

 

Inherited Variables and Functions

All variables and functions in MonoBehaviour are inherited by this class.

 

Classes    
CollisionData   Struct for sending collision data in messages.