1. 程式人生 > >Unity3d編輯animation視窗時,如果要編輯一個Prefab的clip必須先把這個Prefab拖到Scene檢視

Unity3d編輯animation視窗時,如果要編輯一個Prefab的clip必須先把這個Prefab拖到Scene檢視

好吧,最近開始在Asset store上面下資源看別人做的demo了,發現一個問題是我要在animation視窗編輯一個clip,卻死活編輯不了一個prefab物件,只能看,後來在網上找了半天也沒找到答案,最後沒轍還是去官網咖,發現官網上其實已經解釋了這個問題,,,

編輯完成之後,在Scene檢視中將之前拖進去的Prefab物件刪除即可,編輯的資料會實時保留的,,, 官方文件截圖:

Overview

When you open the Animation View (menu: Window > Animation), you will see a window similar to this:

The Animation View is tightly integrated with the Hierarchy View, the Scene View, and the Inspector. Like the Inspector, the Animation View will show whatever Game Object is selected. You can select a Game Object to view using the Hierarchy View or the Scene View. (If you select a Prefab in the Project View you can inspect its animations as well, but you have to drag the Prefab into the Scene View in order to be able to edit them.

)

At the left side of the Animation View is a list of the animated properties of the selected Game Object. Properties can be folded and unfolded by clicking the foldout triangles next to them.

Creating a New Animation Clip

Animated Game Objects in Unity need an Animator Component that controls the animations. If a Game Object doesn't already have an Animator Component, the Animation View will add one for you automatically when creating a new Animation Clip or when entering Animation Mode. To create a new Animation Clip for the selected Game Object, click the selection box at the upper left of the Animation View and select [Create New Clip]. You will then be prompted to save an Animation Clip somewhere in your Assets folder. If the Game Object doesn't have an Animator Component already, it will be automatically added at this point. The new Animation Clip will automatically be added to the Animator.

To begin editing an Animation Clip for the selected Game Object, click on the Animation Mode button (the red "Record" button next to the "Play" button in the animation view toolbar).

This will enter Animation Mode, where changes to the Game Object are stored into the Animation Clip. (If the Game Object doesn't have an Animator Component already, it will be automatically added at this point. If there is not an existing Animation Clip, you will be prompted to save one somewhere in your Assets folder.)

You can stop the Animation Mode at any time by clicking the Animation Mode button again. This will revert the Game Object to the state it was in prior to entering the Animation Mode.

To animate a property, click on the Add Curve button and choose the property from the popup list.

Transform properties are special in that the .x, .y, and .z properties are linked, so those curves are added three at a time. See the section on Using Animation Curves for further information.

如果這個動畫沒有模型的畫,那麼移動這根紅線已經點選左上角那個播放按鈕時,在Inspector檢視是看不到動畫效果的,只能在Scene和Game檢視看到。

When in Animation Mode, a red vertical line will show which frame of the Animation Clip is currently previewed. The Inspector and Scene View will show the Game Object at that frame of the Animation Clip. The values of the animated properties at that frame are also shown in a column to the right of the property names.

You can click anywhere on the Time Line to preview or modify that frame in the Animation Clip. The numbers in the Time Line are shown as seconds and frames, so 1:30 means 1 second and 30 frames.

You can go directly to a specific frame by typing it in, or use the buttons to go to the previous or next keyframe.

You can also use the following keyboard shortcuts to navigate between frames:

  • Press Comma (,) to go to the previous frame.
  • Press Period (.) to go to the next frame.
  • Hold Alt and press Comma (,) to go to the previous keyframe.
  • Hold Alt and press Period (.) to go to the next keyframe.

In Animation Mode you can move, rotate, or scale the Game Object in the Scene View. This will automatically create Animation Curves for the position, rotation and scale properties of the Animation Clip if they didn't already exist, and keys on those Animation Curves will automatically be created at the currently previewed frame to store the respective Transform values you changed.

You can also use the Inspector to modify any of the animatable properties of the Game Object. This too will create Animation Curves as needed, and create keys on those Animation Curves at the currently previewed frame to store your changed values. Properties that are not animatable are grayed out in the Inspector while in Animation Mode.

The Keyframe button creates a keyframe for the shown curves at the currently previewed frame (shortcut: K).

You can also manually create a keyframe using the Keyframe button. This will create a key for all the curves that are currently selected in the Animation View.

When you press the keyframe button, a new keyframe is added to the currently selected properties.

Creating Sprite Animations

There are several ways to create a sprite animation. The easiest is to drag and drop selected sprites from the Project View to the Hierarchy or Scene View in 2D mode. This will create a new Animation Clip and a Game Object with Sprite Renderer and Animator components added.

You can also add a new Animation Clip to a Game Object with an Animation component. One Animator can contain multiple Animation Clips. See the section of the manual about the Mecanim animation system to see how to make transitions between different Animation Clips.

A third way to create new sprite animations is to add new Sprite Frames to an existing Animation Clip. You can drag and drop Sprites from the Project View to the expandedSpriteRenderer.Sprite property in the Dopesheet View

For further details of how to slice existing sprite sheets into single Sprites see the Sprite Editor manual page.

Playback

The Animation Clip can be played back at anytime by clicking the Play button in the Animation View toolbar.

Page last updated: 2013-11-04

相關推薦

Unity3d編輯animation視窗如果編輯一個Prefab的clip必須這個PrefabScene檢視

好吧,最近開始在Asset store上面下資源看別人做的demo了,發現一個問題是我要在animation視窗編輯一個clip,卻死活編輯不了一個prefab物件,只能看,後來在網上找了半天也沒找到答案,最後沒轍還是去官網咖,發現官網上其實已經解釋了這個問題,,, 編輯完

thinkphp5.0 編輯界面驗證不合法後重定向到編輯界面編輯界面重新分配數據

規則 names 得到 還記得 輸入 分配 優先級 rule 獲取 首先,看一看 錯誤場景: 比如說我們有這樣一個編輯界面: 而我們有這樣一些驗證方法(註:采用的是thinkphp5.0的驗證規則) namespace app\admin\validate; use th

MySQL索引使用:字段為varchar類型條件使用''包起來

row prim was OS con xtra str fault 建表語句 結論: 當MySQL中字段為int類型時,搜索條件where num=‘111‘ 與where num=111都可以使用該字段的索引。當MySQL中字段為varchar類型時,搜索條件whe

Jqgrid中動態生成colModel實現雙擊編輯整列鼠標定位在當前雙擊指定單元格

jqGrid使用鼠標定位雙擊的單元格通過配置ondbclick事件來實現雙擊功能ondblClickRow:function(rowid,iRow,iCol,e) {//獲取表格的初始model var colModel =$(TableId).jqG

當虛擬機崩潰怎麽做

blog usr 硬盤容量 tails 鏡像 而是 font snapshot 啟動 使用虛擬機做嵌入式開發,千萬不要一整個盤掛載到/root,如果你這樣做了,這絕對是噩夢的伏筆。 IF( 你的虛擬機不幸崩潰了 ) { 第一步:不要慌張 當你的虛擬機崩潰無

idea建立java類提示填寫描述資訊的修復

idea建立類時提示要輸入描述資訊的錯誤原因時因為,你的一個偶然操作將原本類的描述資訊給誤刪了添加回去即可,具體步驟看下圖: 如何操作呢? #if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE

Asp.net MVC訪問母版頁中巢狀的iframe頁面如果session或cookie過期登入驗證超時怎樣自動跳轉到登入頁

一般登入驗證的過濾器中,使用驗證過濾器的Redirect方法,將請求重定向到指定的URL。但是如果我們要訪問的頁面是一個巢狀在母版頁中的iframe頁面時,這種重定向只會對iframe頁面湊效,也就是會將iframe也重定向到登入頁,這樣就有違我們的目的了。所以我就嘗試了很多方法來實現讓整個頁面重定向到登入頁

轉載:什麼是 .bashrc為什麼編輯 .bashrc? linux學習之路 1

如果你執行一個基於 Unix 或者類 Unix 的作業系統,bash 很有可能是作為預設終端被安裝的。雖然存在很多不同的 shell,bash 卻是最常見或許也是最主流的。如果你不明白那意味著什麼,bash 是一個能解釋你輸入進終端程式的東西,並且基於你的輸入來執行命令。它在一定程度上支援使用指令碼

SparkSQLrdd轉化為DataFrame整個陣列的值都放到Row中則麼辦?

在使用sparkSQL,有時想要把rdd中的資料轉換成DataFrame,RDD中的的資料可能時Array型別,或者是想要把陣列型別中的所有元素放到Row中,當陣列中的元素特別多時,可能就會變得更加麻煩,其實Row的Object中為我們提供了一個很好的方法,就是merge方法,話不多說,直接

mybatis 多表關聯查詢如果使用resultType作為輸出對映估計會出現重複資料

mybatis 多表關聯查詢時,一般建議還是使用把需要關聯的表的pojo新增到主表對應的pojo中作為它的屬性,這樣在mapper.xml檔案中可以使用assacition(一對一查詢),或者colletion(一對多查詢)來使用resultMap作為輸出對映。 不過最近我

多執行緒執行如果一個邏輯需要等若干個執行緒執行完成後再執行怎麼實現?

實際開發過程中,尤其是大型的業務系統中或批量處理系統中,我們通常會用到多執行緒來進行任務拆分,來提高系統的處理能力。當對業務不斷拆分時,多執行緒各自任務之間也形成了錯綜複雜的關係。 我們常常遇到這樣的情況,業務模組A 拆分成了 A1 、A2.....An個多執行緒,來提高處理速度,可是 Ak(1<k&

Unity3D:輸出按下點選到的UI

PointerEventData eventData = new PointerEventData(EventSystem.current); eventData.pressPosition = pos; eventData.position = pos; List<RaycastResul

網路解析如果那些該死的引數該怎麼辦?

//先看一段簡單的網址 //介面地址:http://web.juhe.cn:8080/finance/gold/shgold //返回格式:json //請求方式:get //請求示例:http://web.juhe.cn:8080/finance/gold/shgold?key=您申請

當函式使用結構體指標變數作為引數如果結構體中嵌套了結構體應該如何呼叫其中的元素?

今天寫程式碼時突然遇到了這個問題,以前不曾探討過多層巢狀結構體指標變數的訪問,只知道結構體指標變數要訪問其元素時應該用 -> 來訪問,但對於結構體中巢狀有結構體的時候呢? 請看下面程式碼: #include “stdio.h” using namespac

MySQL插入資料如果記錄不存在則insert如果存在則update

MySQL 當記錄不存在時insert,當記錄存在時更新 網上基本有三種解決方法。 第一種: 示例一:insert多條記錄 假設有一個主鍵為 client_id 的 clients 表,可以使用下面的語句: INSERT INTO clients (clien

Textview 設定字如果字數很多讓text 自動換行

/*** * * @param input * @return */ public static String ToDBC(String input) { char[] c = input.toCharArray(); for (int i = 0; i <

面試如果面試官問你怎樣看待加班應該怎麼回答?

市場經濟機遇與挑戰並存,企業每臨重要關頭,為爭取主動搶佔先機而組織加班,作為員工應該充分理解,主動請戰保質保量加入突擊。當然作為企業應該努力避免此種狀況發生,突擊必然緊張 緊張產生忙亂,連續不斷地加班容易引起員工心理疲勞懈怠情緒,反而影響質量與效率。企業必須在管理上下功夫,努力做到高效八小時,達到緊湊有序

lhgdialog彈出視窗再彈出一級視窗二級視窗在一級視窗下面如何讓他到一級視窗上面?

一級視窗頁面就不給大家提供了,二級視窗頁面如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:/

QT 應用程式關閉某個視窗關閉開啟的所有其他視窗並退出程式

專案中當關閉主視窗時,需要將同時開啟的其他視窗關閉,並退出應用程式,實現方法如下: 在main函式中將QApplication::lastWindowClosed()訊號和QApplication::quit()槽函式相關聯,將主視窗的屬性設定為QWidget::set

“登錄檔修改start page 顯示無法編輯startpage”的對應辦法

今天開啟IE,發現我的主頁被篡改成“http://www.927927.com/?A0108”,看了一下IE的“Internet選項”中,主頁設定的是百度啊,為什麼開啟的時候卻不是呢? 只好去 regedit 裡改了,可以,竟然怎麼改也改不了,一直報 start page 無法修改 網上找了好一陣子,大