質問編集履歴
7
リンク追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -23,6 +23,8 @@
|
|
23
23
|
}
|
24
24
|
```
|
25
25
|
|
26
|
+
[UdonBehaviour.cs](https://github.com/Shoto9023/up/blob/main/UdonBehaviour.cs)
|
27
|
+
|
26
28
|
`Assets\Main_UdonProgramSources\StreamKeyRandomizer.cs(18,23): error CS1061: 'UdonBehaviour' does not contain a definition for 'StreamURL' and no accessible extension method 'StreamURL' accepting a first argument of type 'UdonBehaviour' could be found (are you missing a using directive or an assembly reference?)`
|
27
29
|
|
28
30
|

|
6
コード修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,11 +7,20 @@
|
|
7
7
|
目的のスクリプトコンポーネント自体はPublicで取得しています。
|
8
8
|
|
9
9
|
```cs
|
10
|
-
|
10
|
+
using UdonSharp;
|
11
|
+
using UnityEngine;
|
12
|
+
using UnityEngine.UI;
|
13
|
+
using VRC.SDKBase;
|
14
|
+
using VRC.Udon;
|
11
15
|
|
12
|
-
|
16
|
+
public class StreamKeyRandomizer : UdonSharpBehaviour
|
13
|
-
|
17
|
+
{
|
18
|
+
public UdonBehaviour PlayerAddress;
|
19
|
+
void Start()
|
20
|
+
{
|
14
|
-
VRCUrl
|
21
|
+
VRCUrl target = PlayerAddress.StreamURL;
|
22
|
+
}
|
23
|
+
}
|
15
24
|
```
|
16
25
|
|
17
26
|
`Assets\Main_UdonProgramSources\StreamKeyRandomizer.cs(18,23): error CS1061: 'UdonBehaviour' does not contain a definition for 'StreamURL' and no accessible extension method 'StreamURL' accepting a first argument of type 'UdonBehaviour' could be found (are you missing a using directive or an assembly reference?)`
|
5
エラー文を追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -14,6 +14,8 @@
|
|
14
14
|
VRCUrl url = PlayerAddress.StreamURL;
|
15
15
|
```
|
16
16
|
|
17
|
+
`Assets\Main_UdonProgramSources\StreamKeyRandomizer.cs(18,23): error CS1061: 'UdonBehaviour' does not contain a definition for 'StreamURL' and no accessible extension method 'StreamURL' accepting a first argument of type 'UdonBehaviour' could be found (are you missing a using directive or an assembly reference?)`
|
18
|
+
|
17
19
|

|
18
20
|
|
19
21
|

|
4
コード修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
//このあとにこのようなコードで取得・または変更しようとするとエラーを吐かれる
|
13
13
|
|
14
|
-
VRCUrl url =
|
14
|
+
VRCUrl url = PlayerAddress.StreamURL;
|
15
15
|
```
|
16
16
|
|
17
17
|

|
3
コードを修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,6 +8,10 @@
|
|
8
8
|
|
9
9
|
```cs
|
10
10
|
public UdonBehaviour PlayerAddress;
|
11
|
+
|
12
|
+
//このあとにこのようなコードで取得・または変更しようとするとエラーを吐かれる
|
13
|
+
|
14
|
+
VRCUrl url = VRCURLPlayerAddress.StreamURL;
|
11
15
|
```
|
12
16
|
|
13
17
|

|
2
画像の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,4 +8,8 @@
|
|
8
8
|
|
9
9
|
```cs
|
10
10
|
public UdonBehaviour PlayerAddress;
|
11
|
-
```
|
11
|
+
```
|
12
|
+
|
13
|
+

|
14
|
+
|
15
|
+

|
1
コードを追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,4 +2,10 @@
|
|
2
2
|
|
3
3
|
目的のスクリプトコンポーネントを取得するところまではできているのですが、その先、PublicVariablesに載っている値を他のゲームオブジェクトから取得・変更したいのですが見つかりませんと言われてしまいます。
|
4
4
|
|
5
|
-
どのように書けば取得できるのでしょうか?
|
5
|
+
どのように書けば取得できるのでしょうか?
|
6
|
+
|
7
|
+
目的のスクリプトコンポーネント自体はPublicで取得しています。
|
8
|
+
|
9
|
+
```cs
|
10
|
+
public UdonBehaviour PlayerAddress;
|
11
|
+
```
|