UnityEngine.Component.GetComponent C# (CSharp) Method

GetComponent() public method

public GetComponent ( Type type ) : Component
type Type
return Component
		public Component GetComponent(Type type){}
		public T GetComponent(){}

Same methods

Component::GetComponent ( string type ) : Component
Component::GetComponent ( ) : T

Usage Example

コード例 #1
0
ファイル: Game.cs プロジェクト: Jahoe/Blocks
    /// <summary>
    /// Called when the block swap fails due to specified reason.
    /// </summary>
    /// <param name="block">Second block. First block is pulled from memory</param>
    private void BlockSelectionFail(Component block)
    {
        block.GetComponent<Block>().Selected = false;
        _swap.GridBlocks[_blockMemoryInt].GetComponent<Block>().Selected = false;

        block.GetComponent<Block>().AudioFail();

        _blockMemoryInt = -1;
        BlockSelectedCount = 0;
    }
All Usage Examples Of UnityEngine.Component::GetComponent