unity3d使用什么语言 作为属性怎么使用的

请问一下,人物受击后闪白效果要怎么做呢,用shader吗??-Unity3D-论坛-U3D在线
Unity3D在线
当前位置: ->
-> 请问一下,人物受击后闪白效果要怎么做呢,用shader吗??
Unity3D 论坛 > 请问一下,人物受击后闪白效果要怎么做呢,用shader吗??围观:3004 | 回复:37
吕涵香积分:5帖子:1
请问一下,人物受击后闪白效果要怎么做呢,用shader吗??
曹忆积分:6帖子:0
我这现在有一个项目,想做交互软件,一个工厂的交互陪训,有没有人对这个项目感兴趣的?
李明积分:115帖子:2
赵香积分:56帖子:1
曹忆积分:6帖子:0
急!急!急!急!
乔千积分:62帖子:0
乔千积分:62帖子:0
赵香积分:56帖子:1
那个工厂的啊
胡语旋积分:6帖子:0
有兴趣。价格呢
李明积分:115帖子:2
乔千积分:62帖子:0
免责声明:本站所有内容来源于互联网,如果本站部分内容侵犯您的权益,请您告知,站长会立即处理
Copyright Unity3D在线 All Rights Reserved.Theme by U3dOL 备案:京ICP备号-4 |SiteMap |网站地图 |百度统计| 联系我们Unity3d中的属性(Attributes)整理
Attributes属性属于U3D的RunTimeClass,所以加上以下的命名空间是必须的了。其它倒没什么需要注意的。本文将所有运行属性过一遍罢了。
using UnityE
using System.C
1.AddComponentMenu 添加组件菜单
这函数只是起方便用,原本的脚本(组建)都会在“Component/Script”菜单下,在类之前声明一下这个,它便可以出现在"Componet"菜单下的任何位置。说明指的是要重启U3D才能显示,不过测试貌似直接可以显示。
[AddComponentMenu("MyPhysic/PhysicType")]
public class PhysicType: MonoBehaviour
2.ContextMenu 上下文菜单
这个译名我觉得很不自然,其实上下文算是啥东西……这个函数是在Inspector的脚本中加一个触发事件,就是删除脚本重置脚本按钮的那个小拉菜单中,具体很难说清位置,所以我截了个图。
public class Attributes : MonoBehaviour {
& & [ContextMenu("Hello
& & void HelloWorld()
& Debug.Log("Hello World!");
3.ExecuteInEditMode 在Editor模式下运行
跟名字一样,在编辑器中运行。不过有三种函数的调用方式。
a- "Update()" is only called when something in the scene
b- "OnGUI()" is called when the Game View recieves an
c- "OnRenderObject()" and the other rendering callback
functions are called on every repaint of the Scene View or Game
[ExecuteInEditMode]
public class ExecuteInEditModeTest: MonoBehaviour
& & private Vector3
vec_Rotation = new Vector3(0.0f, 0.5f, 0.0f);
& & //Rotate all the
OnRenderObject()
& transform.Rotate(vec_Rotation);
4.HideInInspector 在检视面板中隐藏
public class HideInspectorTest :
MonoBehaviour&
& & [HideInInspector]
& & public Transform
& & void Start()
& m_Target =
GameObject.Find("test").
5.RequireComponent 必须要有相应的组建
加入一个组建之前必须存在另一个相应的组建,若没有则自动创建。这个在项目中非常有必要用到,尤其是项目人员比较多的时候(大于三四个)。
[RequireComponent (typeof (Rigidbody))]
public class RequireComponentTest : MonoBehaviour {
& & void FixedUpdate()
& rigidbody.AddForce(Vector3.up);
6.NonSerialized 不被序列化
不被序列化该变量,且不显示在检视面板中。
public class Test {
[System.NonSerialized]
& & public int i_Helloword =
7.Serializable 可序列化
这个属性可以让子类(继承类)的变量属性显示在检视面板中,也能序列化它。(JS的话完全不需要这个属性。)
//SerializableTest.cs
[System.Serializable]
public class SerializableTest
& & public int p = 5;
& & public Color c =
//SerializableTest2.cs
public class SerializableTest2 : MonoBehaviour
& & public SerializableTest
8.SerializeField 序列化域(强制序列化)
这里写得比较清楚,可以将私有变量序列化,将U3D的内建变量序列化等。
/Script/Attributes/SerializeField.html
下面的ATTRIBUTE属性估计是没什么人用的了,我也没怎么用过。
1.ImageEffectOpaque 不透明图像效果优先
Any Image Effect with this attribute will be rendered after
opaque geometry but before transparent geometry.
This allows for effects which extensively use the depth buffer
(SSAO ect) to only affect opaque pixels. This Attribute can be used
to reduce the amount of visual artifacts in a scene with post
processing.
没用过这玩意,不过应该很少用得到,优化加速渲染。
2.ImageEffectTransformsToLDR&
也没用过这玩意,LDR应该是某种加载方式。高动态光照渲染(High-Dynamic Range,简称HDR)。
When using HDR rendering it can sometime be desirable to
switch to LDR rendering during ImageEffect rendering.
Using this Attribute on an image effect will cause the
destination buffer to be an LDR buffer, and switch the rest of the
Image Effect pipeline into LDR mode. It is the responsibility of
the Image Effect that this Attribute is associated to ensure that
the output is in the LDR range.
3.NotConvertedAttribute 不转换属性
我觉得这个应该是没有人用的……打包资源的时候,不将成员或类型转换到相应平台,不是很理解这是干嘛的。
Instructs the build pipeline not to convert a type or member
to the target platform.
4.NotFlashValidatedAttribute 不允许转换到FLASH平台
又是个没人用的东西吧?
Instructs the build pipeline not to try and validate a type or
member for the flash platform.
5.NotRenamedAttribute 不允许属性更名
6.PropertyAttribute 财产属性?搞不懂
也不知道用来做啥的。
这个貌似跟NETWORK相关,U3D的NETWORK渣渣,不管了。
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。unity3D的脚本属性用法_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
unity3D的脚本属性用法
&&unity3D的脚本属性用法
阅读已结束,下载文档到电脑
想免费下载更多文档?
定制HR最喜欢的简历
你可能喜欢温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
Q:, 微:iJasonLee, M:
经验:HP(惠普)云渲染开发, 游戏技术美术, 游戏场景制作, 照明工程设计, 建筑效果图/动画, 室内外设计, MAX/CAD讲师,
技能:熟悉CAD, 3dsMax, Photoshop, Maya, VRay, Unity3D, 云渲染等,maxScript, Python, C#, bat, Javascript... {Hello, World.}
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(11486)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
在LOFTER的更多文章
loftPermalink:'',
id:'fks_082065',
blogTitle:'[Unity3D]Script 脚本所有编译器属性详解',
blogAbstract:'Script属性是基于IDE的一系列编译器属性JS中用@script&属性方法()访问,c#中用[属性方法()]访问。一共就只有9种属性访问方式:AddComponentMenu&&&&在Component菜单中添加新的菜单项ContextMenu&&&&&&在当前脚本的组件中添加右键菜单内容ExecuteInEditMode&&&&让当前脚本可以在运行模式中实时更新修改HideInInspector&&&&&&&&是变量在检测时不被显示,但是会被实例化?',
blogTag:'',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:1,
publishTime:7,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:1,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'Q:, 微:iJasonLee, M: \n\n经验:HP(惠普)云渲染开发, 游戏技术美术, 游戏场景制作, 照明工程设计, 建筑效果图/动画, 室内外设计, MAX/CAD讲师,\n\n技能:熟悉CAD, 3dsMax, Photoshop, Maya, VRay, Unity3D, 云渲染等,maxScript, Python, C#, bat, Javascript... {Hello, World.}',
hmcon:'1',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}}

我要回帖

更多关于 unity3d刚体属性 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信