Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Search the Community

Showing results for tags 'blinking'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GENERAL
    • Introduce yourself
    • Discussions
    • Showcase
    • Need help?
    • Seeking team members?
    • Offtopic
  • RESOURCES
    • Example Projects
    • Scripts
    • Shaders
    • Unity Tutorials
    • FPS Kit Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
  • SELL | REQUEST
    • Sell
    • Request
  • Mars' Modular Multiplayer Photon FPS Kit's Topics
  • Mars' Modular Multiplayer Photon FPS Kit's Reviews
  • Mars' Modular Multiplayer Photon FPS Kit's Updates
  • Mars' Modular Multiplayer Photon FPS Kit's Tutorials
  • Busy People's Introductions
  • Photon's Tutorials
  • Photon's Photon General
  • Photon's Showcase

Categories

  • Free Projects
  • Free Assets
  • Game Demos
  • Photon's Files

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


YouTube URL


Facebook URL


Twitter URL


IndieGoGo URL


Kickstarter URL


IndieDB URL


GreenLight URL


Location:


Interests

Found 1 result

  1. Hello, Here is a simple script for blinking the material object and to see the object in the black . How to use: Added script on the object which the mesh renderer and create a new material self-illumin. Put the main material of the object in difmaterial and the material self-illumin in lightmaterial. //Blinking Material Object// var difMaterial : Material; var lightMaterial : Material; var timer : float; var WaitTime : float = 0.5; var ResetPoint : float; function Start () { ResetPoint = WaitTime * 2; } function Update () { timer += Time.deltaTime; if(timer < WaitTime) { renderer.material = difMaterial; } if(timer > WaitTime) { renderer.material = lightMaterial; } if(timer > ResetPoint) { timer = 0; } } or on a gameObject different which does not contain mesh renderer with this script //Blinking Material Object// var objectModel : GameObject; var difMaterial : Material; var lightMaterial : Material; var timer : float; var WaitTime : float = 0.5; var ResetPoint : float; function Start () { ResetPoint = WaitTime * 2; } function Update () { timer += Time.deltaTime; if(timer < WaitTime) { objectModel.renderer.material = difMaterial; } if(timer > WaitTime) { objectModel.renderer.material = lightMaterial; } if(timer > ResetPoint) { timer = 0; } }
×
×
  • Create New...