@@ -51,6 +51,7 @@ private void CreateTexture()
51
51
enableRandomWrite = true
52
52
} ;
53
53
54
+ _renderTexture . Create ( ) ;
54
55
_rawImageOneTexture . texture = _renderTexture ;
55
56
}
56
57
@@ -122,19 +123,19 @@ protected override void InitializeActions()
122
123
Debug . LogError ( "Set particles drawer in inspector !" ) ;
123
124
return ;
124
125
}
125
-
126
+
126
127
CreateBuffer ( ) ;
127
128
CreateTexture ( ) ;
128
129
CreateTextureArray ( ) ;
129
130
ActionUnitySampleTexture actionUnitySampleTexture = new ActionUnitySampleTexture ( _renderTexture ) ;
130
- ActionUnitySampleTextureArray actionUnitySampleTextureArray = new ActionUnitySampleTextureArray ( _renderTexture ) ;
131
131
ActionUnitySampleVertexBuffer actionUnitySampleVertexBuffer = new ActionUnitySampleVertexBuffer ( _computeBuffer , _sizeBuffer ) ;
132
+ ActionUnitySampleTextureArray actionUnitySampleTextureArray = new ActionUnitySampleTextureArray ( _renderTextureArray ) ;
132
133
RegisterActionUnity ( actionUnitySampleTexture , _ActionTextureName ) ;
133
134
RegisterActionUnity ( actionUnitySampleVertexBuffer , _ActionVertexBufferName ) ;
134
135
RegisterActionUnity ( actionUnitySampleTextureArray , _ActionTextureArrayName ) ;
135
136
CallFunctionStartInAction ( _ActionTextureName ) ;
136
- CallFunctionStartInAction ( _ActionTextureArrayName ) ;
137
137
CallFunctionStartInAction ( _ActionVertexBufferName ) ;
138
+ CallFunctionStartInAction ( _ActionTextureArrayName ) ;
138
139
}
139
140
140
141
@@ -144,8 +145,13 @@ protected override void InitializeActions()
144
145
protected override void UpdateActions ( )
145
146
{
146
147
base . UpdateActions ( ) ;
148
+ CallFunctionUpdateInAction ( _ActionTextureArrayName ) ;
147
149
CallFunctionUpdateInAction ( _ActionTextureName ) ;
148
150
CallFunctionUpdateInAction ( _ActionVertexBufferName ) ;
151
+ Graphics . CopyTexture ( _renderTextureArray , 0 , _renderTextureForDisplay0 , 0 ) ;
152
+ Graphics . CopyTexture ( _renderTextureArray , 1 , _renderTextureForDisplay1 , 0 ) ;
153
+ _rawImageTextureArray0 . texture = _renderTextureForDisplay0 ;
154
+ _rawImageTextureArray1 . texture = _renderTextureForDisplay1 ;
149
155
}
150
156
151
157
/// <summary>
@@ -154,6 +160,7 @@ protected override void UpdateActions()
154
160
protected override void OnDestroyActions ( )
155
161
{
156
162
base . OnDestroyActions ( ) ;
163
+ CallFunctionOnDestroyInAction ( _ActionTextureArrayName ) ;
157
164
CallFunctionOnDestroyInAction ( _ActionTextureName ) ;
158
165
CallFunctionOnDestroyInAction ( _ActionVertexBufferName ) ;
159
166
}
0 commit comments