【3Dゲームエンジン】Unity質問スレッド29at GAMEDEV
【3Dゲームエンジン】Unity質問スレッド29 - 暇つぶし2ch484:名前は開発中のものです。
17/06/18 21:40:40.73 WNEWBLm8.net
>>469
単にこういうやつを求めてる?
using UnityEditor;
using UnityEngine;
using System.Collections.Generic;
public class attachSelectObjects
{
[MenuItem("Assets/autoAttach")]
static void autoAttach()
{
List<GameObject> l = GameObject.Find("GameManager")
.GetComponent<myScript> ().myList; //アタッチ先のリストを取得
foreach(GameObject go in Selection.gameObjects){
//ヒエラルキーで選択しているゲームオブジェクトをリストに登録
l.Add (go);
}
}
}


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch