Giter Site home page Giter Site logo

unity_noviceseeonlyspot's People

Contributors

samplecj avatar

Watchers

 avatar  avatar

unity_noviceseeonlyspot's Issues

Script Function Order


Script order

  • Awake()
  • Start()
  • FixedUpdated()
  • Update()
  • LateUpdate()
  • GUI()
  • Destroy()

Awake() & Start()

  • 一般在Awake() 做变量赋值初始化操作.
  • 当脚本被禁用时, Awake() 可被调用, 而Start() 不会被调用.

FixedUpdate() & Update()

  • 当需要做一些"物理变动"时, 写入FixedUpdate(). 因为 FixedUpdate() 在固定时间后必定调用, 而Update() 的调用时机不是确定的, 可能导致动作混乱.

Destroy()

  • Destroy(GameObject)
  • Destroy(GetComponent())

UnExpected: No Shadows

Unity设置里是否允许产生阴影

  • 菜单栏上 Edit -> Project Setting -> Quality
    Shadows -> Shadows -> Hard and Soft Shadows

照射光

  • 在光源(Directional light)的属性Inspector -> Shadow Type ->
    No Shadow ... ×
    Hard Shadow ... √
    Soft Shadow ... √

被照物体

  • 在其属性Inspector -> Cast Shadow : On; Receive Shadows : √.
  • 是否选择了具有"透明性质"的shader.

其他

  • 模型尺寸太大, 镜头比较远. 则把模型缩小, 镜头拉到最近才能看到.
  • 若编辑区只显示黑, 连新建场景也没有用, 则考虑是Layers的问题.
    Layers -> Everything

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.